##// END OF EJS Templates
prevent race condition in purge_results test...
MinRK -
Show More
@@ -249,7 +249,14 b' class TestClient(ClusterTestCase):'
249 249 # ensure there are some tasks
250 250 for i in range(5):
251 251 self.client[:].apply_sync(lambda : 1)
252 # Wait for the Hub to realise the result is done:
253 # This prevents a race condition, where we
254 # might purge a result the Hub still thinks is pending.
255 time.sleep(0.1)
256 rc2 = clientmod.Client(profile='iptest')
252 257 hist = self.client.hub_history()
258 ahr = rc2.get_result([hist[-1]])
259 ahr.wait(10)
253 260 self.client.purge_results(hist[-1])
254 261 newhist = self.client.hub_history()
255 262 self.assertEquals(len(newhist)+1,len(hist))
General Comments 0
You need to be logged in to leave comments. Login now