Skip to content

Commit

Permalink
Merge pull request #495 from jonhoo/fix_racy_fairness
Browse files Browse the repository at this point in the history
Relax racy fairness test
  • Loading branch information
Stjepan Glavina authored May 19, 2020
2 parents 729ebd4 + f06d877 commit de59f9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crossbeam-channel/tests/ready.rs
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ fn fairness1() {

#[test]
fn fairness2() {
const COUNT: usize = 10_000;
const COUNT: usize = 100_000;

let (s1, r1) = unbounded::<()>();
let (s2, r2) = bounded::<()>(1);
Expand Down Expand Up @@ -831,7 +831,7 @@ fn fairness2() {
}
}
}
assert!(hits.iter().all(|x| x.get() >= COUNT / hits.len() / 10));
assert!(hits.iter().all(|x| x.get() > 0));
})
.unwrap();
}

0 comments on commit de59f9b

Please sign in to comment.