Skip to content

Commit caf9b41

Browse files
committed
Wait for next tick in subscription test
Replicates graphql/graphql-js@4f26a6b
1 parent 63e424c commit caf9b41

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/subscription/test_subscribe.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import asyncio
2+
13
from typing import Any, Dict, Optional, Callable
24

35
from pytest import mark, raises # type: ignore
@@ -222,6 +224,7 @@ async def accepts_type_definition_with_async_subscribe_function():
222224
pubsub = EventEmitter()
223225

224226
async def subscribe_email(_inbox, _info):
227+
await asyncio.sleep(0)
225228
return EventEmitterAsyncIterator(pubsub, "importantEmail")
226229

227230
schema = GraphQLSchema(

0 commit comments

Comments
 (0)