Skip to content

Commit 6ae9260

Browse files
committed
Fixed test flakiness, added loop to wait for non-empty response line.
1 parent 26e6940 commit 6ae9260

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

kubernetes/e2e_test/test_client.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,11 @@ def test_pod_apis(self):
144144
self.assertEqual("test string 2", line)
145145
resp.write_stdin("exit\n")
146146
resp.update(timeout=5)
147-
line = resp.read_channel(ERROR_CHANNEL)
147+
while True:
148+
line = resp.read_channel(ERROR_CHANNEL)
149+
if line != '':
150+
break
151+
time.sleep(1)
148152
status = json.loads(line)
149153
self.assertEqual(status['status'], 'Success')
150154
resp.update(timeout=5)

0 commit comments

Comments
 (0)