From 7d9b626d2ed304de0f5aa6083c782dcd00ed51dc Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 8 May 2018 15:40:57 +1200 Subject: clientplayback: try to fix flaky replay test --- test/mitmproxy/addons/test_clientplayback.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/mitmproxy/addons/test_clientplayback.py b/test/mitmproxy/addons/test_clientplayback.py index 1b385e23..8a160f0d 100644 --- a/test/mitmproxy/addons/test_clientplayback.py +++ b/test/mitmproxy/addons/test_clientplayback.py @@ -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 -- cgit v1.2.3