Skip to content

Commit

Permalink
Sleep for a really long time in GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
jennydaman committed Sep 10, 2024
1 parent 9685454 commit 42a0e5f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async fn test_run_everything_from_env() {
// so that here in the test we can assert that the "DONE" messages do
// indeed come last and no out-of-order/race condition errors are happening.
// https://github.com/FNNDSC/oxidicom/issues/4
tokio::time::sleep(Duration::from_secs(2)).await;
tokio::time::sleep(sleep_duration()).await;
nats_shutdown_tx.send(true).await.unwrap();
let lonk_messages = nats_subscriber_loop.await.unwrap();

Expand Down Expand Up @@ -106,3 +106,11 @@ fn create_test_options<P: AsRef<Utf8Path>>(
listener_port: 11112,
}
}

fn sleep_duration() -> Duration {
if env!("CI") == "true" {
Duration::from_secs(10)
} else {
Duration::from_millis(500)
}
}

0 comments on commit 42a0e5f

Please sign in to comment.