From 6fe175913e611097fdfdf0a6b20b1c05909374e1 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Tue, 18 Jun 2013 00:54:07 +0200 Subject: [PATCH] fix request_timestamps test case --- test/test_server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_server.py b/test/test_server.py index 079ed8ce1..85c20737d 100644 --- a/test/test_server.py +++ b/test/test_server.py @@ -256,13 +256,14 @@ class TestProxy(tservers.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(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 request.timestamp_end - request.timestamp_start > 0 + assert 0.95 < (request.timestamp_end - request.timestamp_start) < 1.2 #time.sleep might be a little bit shorter than a second def test_request_timestamps_not_affected_by_client_time(self): # test that don't include user wait time in request's timestamps