From 76ebaea944c7b117bc910c158e741f202ea2101d Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Wed, 16 May 2018 12:17:06 -0700 Subject: [PATCH] fix test_dedup_min_text_size failure? by waiting for postfetch chain in test_socket_timeout_response --- tests/test_warcprox.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_warcprox.py b/tests/test_warcprox.py index 2a12b22..079fdd1 100755 --- a/tests/test_warcprox.py +++ b/tests/test_warcprox.py @@ -1837,6 +1837,8 @@ def test_socket_timeout_response( """Response will timeout because we use --socket-timeout=4 whereas the target URL will return after 6 sec. """ + urls_before = warcprox_.proxy.running_stats.urls + url = 'http://localhost:%s/slow-response' % http_daemon.server_port response = requests.get(url, proxies=archiving_proxies, verify=False) assert response.status_code == 502 @@ -1849,6 +1851,8 @@ def test_socket_timeout_response( assert response.status_code == 404 assert response.content == b'404 Not Found\n' + wait(lambda: warcprox_.proxy.running_stats.urls - urls_before == 1) + def test_empty_response( warcprox_, http_daemon, https_daemon, archiving_proxies, playback_proxies):