Skip to content

Commit

Permalink
Fix a test
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed Sep 9, 2024
1 parent 92ff038 commit 7c232a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/plugins/ctrl/schema/mutations/test_interrupt.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import asyncio

from nextline import Nextline
from strawberry.types import ExecutionResult

from nextlinegraphql.plugins.ctrl.graphql import MUTATE_INTERRUPT
from tests.plugins.ctrl.schema.conftest import Schema
Expand All @@ -18,9 +19,12 @@ async def test_schema(schema: Schema) -> None:
async with nextline:
task = asyncio.create_task(nextline.run_continue_and_wait(started=started))

await started.wait()
await started.wait() # TODO: Update `started` so that `sleep()` is unnecessary
await asyncio.sleep(1)

result = await schema.execute(MUTATE_INTERRUPT, context_value=context)

assert isinstance(result, ExecutionResult)
assert (data := result.data)
assert data['ctrl']['interrupt'] is True

Expand Down

0 comments on commit 7c232a9

Please sign in to comment.