##// END OF EJS Templates
minor tweak to wait_for_idle in tests
MinRK -
Show More
@@ -285,16 +285,16 b' class TestClient(ClusterTestCase):'
285 """wait for an engine to become idle, according to the Hub"""
285 """wait for an engine to become idle, according to the Hub"""
286 rc = self.client
286 rc = self.client
287
287
288 # timeout 2s, polling every 100ms
288 # timeout 5s, polling every 100ms
289 for i in range(20):
289 qs = rc.queue_status()
290 qs = rc.queue_status()
290 for i in range(50):
291 if qs['unassigned'] or any(qs[eid]['tasks'] for eid in rc.ids):
291 if qs['unassigned'] or any(qs[eid]['tasks'] for eid in rc.ids):
292 time.sleep(0.1)
292 time.sleep(0.1)
293 qs = rc.queue_status()
293 else:
294 else:
294 break
295 break
295
296
296 # ensure Hub up to date:
297 # ensure Hub up to date:
297 qs = rc.queue_status()
298 self.assertEquals(qs['unassigned'], 0)
298 self.assertEquals(qs['unassigned'], 0)
299 for eid in rc.ids:
299 for eid in rc.ids:
300 self.assertEquals(qs[eid]['tasks'], 0)
300 self.assertEquals(qs[eid]['tasks'], 0)
General Comments 0
You need to be logged in to leave comments. Login now