clientplayback: try to fix flaky replay test

This commit is contained in:
Aldo Cortesi 2018-05-08 15:40:57 +12:00
parent af1a4ffdcd
commit 7d9b626d2e
1 changed files with 2 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class TBase(tservers.HTTPProxyTest):
s = time.time()
while True:
if flow.response or flow.error:
flow.server_conn.close()
break
time.sleep(0.001)
if time.time() - s > 5:
@ -55,6 +56,7 @@ class TBase(tservers.HTTPProxyTest):
l = self.master.state.flows[-1]
assert l.response.status_code == 304
l.request.path = "/p/305"
l.response = None
cr.start_replay([l])
self.wait_response(l)
assert l.response.status_code == 305