Skip to content

Commit 1164301

Browse files
committed
Tests: Fix race condition in: test_some_tasks_may_complete_immediately
1 parent 3da19b8 commit 1164301

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/crystal/tests/test_tasks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ async def test_some_tasks_may_complete_immediately(subtests) -> None:
5858
with subtests.test(task_type='DownloadResourceTask'):
5959
# Download the resource
6060
assert False == missing_r.already_downloaded_this_session
61-
missing_rr_future = missing_r.download() # uses DownloadResourceTask
61+
dr_task = missing_r.download_with_task() # uses DownloadResourceTask
6262
await wait_for(
63-
lambda: missing_rr_future.done() or None,
63+
lambda: dr_task.complete or None,
6464
timeout=MAX_TIME_TO_DOWNLOAD_404_URL)
6565
assert True == missing_r.already_downloaded_this_session
6666

0 commit comments

Comments
 (0)