Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
fix(swarm-test): add biased to tokio::select for non-random behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
rand0m-cloud authored and koivunej committed Apr 1, 2022
1 parent 6c6fc3d commit 77291ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/p2p/swarm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,8 @@ mod tests {

loop {
tokio::select! {
biased;

_ = (&mut swarm1).next() => {},
_ = (&mut swarm2).next() => {},
res = (&mut sub) => {
Expand Down

0 comments on commit 77291ee

Please sign in to comment.