From 0f406e9daa3a0cbaf65954266969406900811280 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 18 Jan 2013 14:52:19 +1300 Subject: [PATCH] Speed up the test suite by reducing time sleeping in tests. --- test/test_server.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/test_server.py b/test/test_server.py index 3686a6a85..558e7ccac 100644 --- a/test/test_server.py +++ b/test/test_server.py @@ -108,21 +108,20 @@ class TestProxy(tutils.HTTPProxTest): # call pathod server, wait a second to complete the request connection.send("GET http://localhost:%d/p/304:b@1k HTTP/1.1\r\n"%self.server.port) - time.sleep(2.1) + time.sleep(0.1) connection.send("\r\n"); connection.recv(50000) connection.close() request, response = self.master.state.view[0].request, self.master.state.view[0].response assert response.code == 304 # sanity test for our low level request - assert 2 <= request.timestamp_end - request.timestamp_start <= 2.2 + assert 0 <= request.timestamp_end - request.timestamp_start <= 0.2 def test_request_timestamps_not_affected_by_client_time(self): # test that don't include user wait time in request's timestamps f = self.pathod("304:b@10k") assert f.status_code == 304 - time.sleep(1) f = self.pathod("304:b@10k") assert f.status_code == 304