Skip to content

Commit

Permalink
Add comment to timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
bgw committed Aug 29, 2024
1 parent 19f59a0 commit 61dbff3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions turbopack/crates/turbo-tasks-testing/tests/detached.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ static REGISTRATION: Registration = register!();
#[tokio::test]
async fn test_spawns_detached() -> anyhow::Result<()> {
run(&REGISTRATION, || async {
// timeout: prevent the test from hanging, and fail instead if this is broken
timeout(Duration::from_secs(5), async {
let notify = TransientInstance::new(Notify::new());
let (tx, mut rx) = watch::channel(None);
Expand Down Expand Up @@ -60,6 +61,7 @@ async fn spawns_detached(
#[tokio::test]
async fn test_spawns_detached_changing() -> anyhow::Result<()> {
run(&REGISTRATION, || async {
// timeout: prevent the test from hanging, and fail instead if this is broken
timeout(Duration::from_secs(5), async {
let (tx, mut rx) = watch::channel(None);
let tx = TransientInstance::new(tx);
Expand Down

0 comments on commit 61dbff3

Please sign in to comment.