Fixed test flakiness, added loop to wait for non-empty response line.
This commit is contained in:
parent
26e6940d20
commit
6ae9260e9e
@ -144,7 +144,11 @@ class TestClient(unittest.TestCase):
|
||||
self.assertEqual("test string 2", line)
|
||||
resp.write_stdin("exit\n")
|
||||
resp.update(timeout=5)
|
||||
line = resp.read_channel(ERROR_CHANNEL)
|
||||
while True:
|
||||
line = resp.read_channel(ERROR_CHANNEL)
|
||||
if line != '':
|
||||
break
|
||||
time.sleep(1)
|
||||
status = json.loads(line)
|
||||
self.assertEqual(status['status'], 'Success')
|
||||
resp.update(timeout=5)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user