Skip to content

Commit

Permalink
Reduce the number of workers per test
Browse files Browse the repository at this point in the history
  • Loading branch information
lu-zero committed Aug 15, 2023
1 parent 66c16a7 commit 8936bc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dht-cache/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ mod test {
[a_c, b_c, c_c]
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn peers() {
let [mut a, mut b, mut c] = make_peers(12).await;
let mut d = make_peer(12).await;
Expand All @@ -429,7 +429,7 @@ mod test {
assert!(expected.is_empty());
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn syncronization() {
let [mut a, mut b, mut c] = make_peers(13).await;
let mut d = make_peer(13).await;
Expand Down
2 changes: 1 addition & 1 deletion dht-cache/src/dht.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ pub(crate) mod test {
[a, b, c]
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn multiple_peers() {
let [a, b, c] = make_peers(11).await;

Expand Down

0 comments on commit 8936bc0

Please sign in to comment.