fix: Flaky test_single_worker

This commit is contained in:
Arne Beer 2023-02-09 12:10:51 +01:00
parent a28653653a
commit aab72321a4
No known key found for this signature in database
GPG Key ID: CC9408F679023B65
1 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,8 @@ async fn test_single_worker() -> Result<()> {
for _ in 0..3 {
assert_success(add_env_task(shared, "sleep 0.1").await?);
}
// Wait a second. Since the tasks are run sequentially, the timings are sometimes a bit tight.
sleep_ms(1000).await;
// Wait for the last task to finish.
wait_for_task_condition(shared, 2, |task| task.is_done()).await?;