From 0f8a602c3c67fb55d992898cc7a146b9232572bd Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Mon, 15 Apr 2019 15:52:32 +0300 Subject: [PATCH] Tests: added time to handle requests in access_log partial tests. --- test/test_access_log.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/test/test_access_log.py b/test/test_access_log.py index ad47c971..c9588e61 100644 --- a/test/test_access_log.py +++ b/test/test_access_log.py @@ -177,7 +177,9 @@ Connection: close def test_access_log_partial(self): self.load('empty') - self.http(b"""GE""", raw=True, no_recv=True) + self.assertEqual(self.post()['status'], 200, 'init') + + self.http(b"""GE""", raw=True, read_timeout=1) self.stop() @@ -188,7 +190,9 @@ Connection: close def test_access_log_partial_2(self): self.load('empty') - self.http(b"""GET /\n""", raw=True, no_recv=True) + self.assertEqual(self.post()['status'], 200, 'init') + + self.http(b"""GET /\n""", raw=True, read_timeout=1) self.stop() @@ -199,7 +203,9 @@ Connection: close def test_access_log_partial_3(self): self.load('empty') - self.http(b"""GET / HTTP/1.1""", raw=True, no_recv=True) + self.assertEqual(self.post()['status'], 200, 'init') + + self.http(b"""GET / HTTP/1.1""", raw=True, read_timeout=1) self.stop() @@ -210,7 +216,9 @@ Connection: close def test_access_log_partial_4(self): self.load('empty') - resp = self.http(b"""GET / HTTP/1.1\n""", raw=True, no_recv=True) + self.assertEqual(self.post()['status'], 200, 'init') + + resp = self.http(b"""GET / HTTP/1.1\n""", raw=True, read_timeout=1) self.stop()