Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianCzajkowski committed Jul 31, 2024
1 parent b0a84d7 commit f42072d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/asgi/test_websockets_graphql_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,7 @@ def test_stop(client):
"payload": {"query": "subscription { ping }"},
}
)
# Adding a short delay to allow the WebSocket server to process the GQL_START message
# and establish the subscription properly. This ensures that subsequent messages
# such as GQL_STOP are handled in the correct sequence and context.
time.sleep(0.5)
ws.receive_json()
ws.send_json({"type": GraphQLWSHandler.GQL_STOP, "id": "test1"})
response = ws.receive_json()
assert response["type"] == GraphQLWSHandler.GQL_COMPLETE
Expand Down

0 comments on commit f42072d

Please sign in to comment.