Skip to content

Commit

Permalink
Remove timeouts from test
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Booth committed May 13, 2019
1 parent c9a0a37 commit 00dd6dd
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions tests/test_jsonrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,16 +1029,14 @@ async def receive_request(count):

connection = JSONRPCConnection(protocol)
connection.max_response_size = size
async with timeout_after(0.01):
async with TaskGroup() as group:
await group.spawn(receive_request(1))
await group.spawn(send_request_good(request))
async with TaskGroup() as group:
await group.spawn(receive_request(1))
await group.spawn(send_request_good(request))

connection.max_response_size = size - 1
async with timeout_after(0.01):
async with TaskGroup() as group:
await group.spawn(receive_request(1))
await group.spawn(send_request_bad(request))
async with TaskGroup() as group:
await group.spawn(receive_request(1))
await group.spawn(send_request_bad(request))

async def send_batch(batch):
message, future = connection.send_batch(batch)
Expand All @@ -1053,10 +1051,9 @@ async def send_batch(batch):
if protocol.allow_batches:
connection.max_response_size = size + 3
batch = Batch([request, request, request])
async with timeout_after(0.01):
async with TaskGroup() as group:
await group.spawn(receive_request(len(batch)))
await group.spawn(send_batch(batch))
async with TaskGroup() as group:
await group.spawn(receive_request(len(batch)))
await group.spawn(send_batch(batch))


def test_misc(protocol):
Expand Down

0 comments on commit 00dd6dd

Please sign in to comment.