aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/http2_test/test_goaway.py
diff options
context:
space:
mode:
authorGravatar Makarand Dharmapurikar <makarandd@google.com>2016-12-12 13:58:15 -0800
committerGravatar Makarand Dharmapurikar <makarandd@google.com>2016-12-12 13:58:15 -0800
commit8c57917f56bc7af695f2c92f8e5678160da4276e (patch)
treef20d42c8c4e23826a93075951c0ee4e044f9b879 /test/http2_test/test_goaway.py
parenta16ea7f9b129d34edbdb867e720d4a2ea71e9a7f (diff)
fixed feedback from review
Diffstat (limited to 'test/http2_test/test_goaway.py')
-rw-r--r--test/http2_test/test_goaway.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/http2_test/test_goaway.py b/test/http2_test/test_goaway.py
index 7a915402b2..6deb883d4e 100644
--- a/test/http2_test/test_goaway.py
+++ b/test/http2_test/test_goaway.py
@@ -1,5 +1,6 @@
import logging
import time
+
import http2_base_server
class TestcaseGoaway(object):
@@ -7,7 +8,7 @@ class TestcaseGoaway(object):
This test does the following:
Process incoming request normally, i.e. send headers, data and trailers.
Then send a GOAWAY frame with the stream id of the processed request.
- It assert that the next request is made on a different TCP connection.
+ It checks that the next request is made on a different TCP connection.
"""
def __init__(self, iteration):
self._base_server = http2_base_server.H2ProtocolBaseServer()
@@ -22,15 +23,14 @@ class TestcaseGoaway(object):
return self._base_server
def on_connection_lost(self, reason):
- logging.info('Disconnect received. Count %d'%self._iteration)
+ logging.info('Disconnect received. Count %d' % self._iteration)
# _iteration == 2 => Two different connections have been used.
if self._iteration == 2:
self._base_server.on_connection_lost(reason)
def on_send_done(self, stream_id):
self._base_server.on_send_done_default(stream_id)
- time.sleep(1)
- logging.info('Sending GOAWAY for stream %d:'%stream_id)
+ logging.info('Sending GOAWAY for stream %d:' % stream_id)
self._base_server._conn.close_connection(error_code=0, additional_data=None, last_stream_id=stream_id)
self._base_server._stream_status[stream_id] = False
@@ -42,7 +42,7 @@ class TestcaseGoaway(object):
self._base_server.on_data_received_default(event)
sr = self._base_server.parse_received_data(event.stream_id)
if sr:
- logging.info('Creating response size = %s'%sr.response_size)
+ logging.info('Creating response size = %s' % sr.response_size)
response_data = self._base_server.default_response_data(sr.response_size)
self._ready_to_send = True
self._base_server.setup_send(response_data, event.stream_id)