Skip to content

Commit ed18fd4

Browse files
committed
faster tests
1 parent a0f75a5 commit ed18fd4

6 files changed

+6
-6
lines changed

tests/test_aiohttp_websocket_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async def test_aiohttp_websocket_server_does_not_send_ack(server, query_str):
118118

119119
url = f"ws://{server.hostname}:{server.port}/graphql"
120120

121-
transport = AIOHTTPWebsocketsTransport(url=url, ack_timeout=1)
121+
transport = AIOHTTPWebsocketsTransport(url=url, ack_timeout=0.1)
122122

123123
with pytest.raises(asyncio.TimeoutError):
124124
async with Client(transport=transport):

tests/test_aiohttp_websocket_graphqlws_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ async def test_aiohttp_websocket_graphqlws_server_does_not_send_ack(
117117

118118
url = f"ws://{graphqlws_server.hostname}:{graphqlws_server.port}/graphql"
119119

120-
transport = AIOHTTPWebsocketsTransport(url=url, ack_timeout=1)
120+
transport = AIOHTTPWebsocketsTransport(url=url, ack_timeout=0.1)
121121

122122
with pytest.raises(asyncio.TimeoutError):
123123
async with Client(transport=transport):

tests/test_aiohttp_websocket_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ async def test_aiohttp_websocket_server_closing_after_first_query(
319319
await session.execute(query)
320320

321321
# Then we do other things
322-
await asyncio.sleep(1000 * MS)
322+
await asyncio.sleep(10 * MS)
323323

324324
# Now the server is closed but we don't know it yet, we have to send a query
325325
# to notice it and to receive the exception

tests/test_graphqlws_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ async def test_graphqlws_server_does_not_send_ack(graphqlws_server, query_str):
111111

112112
url = f"ws://{graphqlws_server.hostname}:{graphqlws_server.port}/graphql"
113113

114-
transport = WebsocketsTransport(url=url, ack_timeout=1)
114+
transport = WebsocketsTransport(url=url, ack_timeout=0.1)
115115

116116
with pytest.raises(asyncio.TimeoutError):
117117
async with Client(transport=transport):

tests/test_websocket_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async def test_websocket_server_does_not_send_ack(server, query_str):
118118

119119
url = f"ws://{server.hostname}:{server.port}/graphql"
120120

121-
transport = WebsocketsTransport(url=url, ack_timeout=1)
121+
transport = WebsocketsTransport(url=url, ack_timeout=0.1)
122122

123123
with pytest.raises(asyncio.TimeoutError):
124124
async with Client(transport=transport):

tests/test_websocket_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ async def test_websocket_server_closing_after_first_query(client_and_server, que
288288
await session.execute(query)
289289

290290
# Then we do other things
291-
await asyncio.sleep(100 * MS)
291+
await asyncio.sleep(10 * MS)
292292

293293
# Now the server is closed but we don't know it yet, we have to send a query
294294
# to notice it and to receive the exception

0 commit comments

Comments
 (0)