Skip to content

Commit

Permalink
remove long validation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kristjanvalur committed Jun 8, 2023
1 parent a3028b0 commit 838581b
Showing 1 changed file with 0 additions and 56 deletions.
56 changes: 0 additions & 56 deletions tests/websockets/test_graphql_transport_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,59 +940,3 @@ async def test_validation_subscription(ws: WebSocketClient):
assert len(response["payload"]) == 1
assert response["payload"][0].get("path") == ["conditionalFail"]
assert response["payload"][0]["message"] == "failed after sleep None"


async def test_long_validation_concurrent_query(ws: WebSocketClient):
"""
Test that the websocket is not blocked while validating a
single-result-operation
"""
await ws.send_json(
SubscribeMessage(
id="sub1",
payload=SubscribeMessagePayload(
query="query { conditionalFail(sleep:0.1) }"
),
).as_dict()
)
await ws.send_json(
SubscribeMessage(
id="sub2",
payload=SubscribeMessagePayload(
query="query { conditionalFail(fail:false) }"
),
).as_dict()
)

# we expect the second query to arrive first, because the
# first query is stuck in validation
response = await ws.receive_json()
assert_next(response, "sub2", {"conditionalFail": "Hey"})


async def test_long_validation_concurrent_subscription(ws: WebSocketClient):
"""
Test that the websocket is not blocked while validating a
subscription
"""
await ws.send_json(
SubscribeMessage(
id="sub1",
payload=SubscribeMessagePayload(
query="subscription { conditionalFail(sleep:0.1) }"
),
).as_dict()
)
await ws.send_json(
SubscribeMessage(
id="sub2",
payload=SubscribeMessagePayload(
query="query { conditionalFail(fail:false) }"
),
).as_dict()
)

# we expect the second query to arrive first, because the
# first operation is stuck in validation
response = await ws.receive_json()
assert_next(response, "sub2", {"conditionalFail": "Hey"})

0 comments on commit 838581b

Please sign in to comment.