Skip to content

Commit

Permalink
Merge pull request #588 from tursodatabase/conccurent-conns-test-timeout
Browse files Browse the repository at this point in the history
add timeout to conccurent connections test
  • Loading branch information
MarinPostma committed Nov 8, 2023
2 parents 69b0bbc + 4219220 commit 4de5737
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions libsql-server/src/connection/libsql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1208,8 +1208,14 @@ mod test {
join_set.spawn(run_conn(maker.clone()));
}

while let Some(next) = join_set.join_next().await {
next.unwrap();
}
let join_all = async move {
while let Some(next) = join_set.join_next().await {
next.unwrap();
}
};

tokio::time::timeout(Duration::from_secs(30), join_all)
.await
.expect("timed out running connections");
}
}

0 comments on commit 4de5737

Please sign in to comment.