From 6fc2ff94694d70426663209e2ded977d9e0ecd3c Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Fri, 21 Aug 2015 09:18:14 +0200 Subject: [PATCH] http2: fix tests --- test/http/http2/test_protocol.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/http/http2/test_protocol.py b/test/http/http2/test_protocol.py index fb1f460e9..726d8e2e3 100644 --- a/test/http/http2/test_protocol.py +++ b/test/http/http2/test_protocol.py @@ -127,7 +127,7 @@ class TestPerformServerConnectionPreface(tservers.ServerTestBase): protocol.perform_server_connection_preface() assert protocol.connection_preface_performed - tutils.raises(tcp.NetLibIncomplete, protocol.perform_server_connection_preface, force=True) + tutils.raises(tcp.NetLibDisconnect, protocol.perform_server_connection_preface, force=True) class TestPerformClientConnectionPreface(tservers.ServerTestBase): @@ -194,12 +194,12 @@ class TestServerStreamIds(): class TestApplySettings(tservers.ServerTestBase): class handler(tcp.BaseHandler): - def handle(self): # check settings acknowledgement assert self.rfile.read(9) == '000000040100000000'.decode('hex') self.wfile.write("OK") self.wfile.flush() + self.rfile.safe_read(9) # just to keep the connection alive a bit longer ssl = True @@ -295,6 +295,7 @@ class TestReadRequest(tservers.ServerTestBase): self.wfile.write( b'000006000100000001666f6f626172'.decode('hex')) self.wfile.flush() + self.rfile.safe_read(9) # just to keep the connection alive a bit longer ssl = True @@ -385,13 +386,13 @@ class TestReadRequestConnect(tservers.ServerTestBase): class TestReadResponse(tservers.ServerTestBase): class handler(tcp.BaseHandler): - def handle(self): self.wfile.write( b'00000801040000000188628594e78c767f'.decode('hex')) self.wfile.write( b'000006000100000001666f6f626172'.decode('hex')) self.wfile.flush() + self.rfile.safe_read(9) # just to keep the connection alive a bit longer ssl = True