Skip to content

Commit

Permalink
Attempt to fix intermittent test failures (openethereum#8584)
Browse files Browse the repository at this point in the history
Occasionally should_return_correct_nonces_when_dropped_because_of_limit fails, possibly because of multiple threads competing to finish. See CI logs here for an example: https://gitlab.parity.io/parity/parity/-/jobs/86738
  • Loading branch information
dvdplm authored and VladLupashevskyi committed May 23, 2018
1 parent 7701b64 commit 17e2a25
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions miner/src/pool/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ fn should_return_correct_nonces_when_dropped_because_of_limit() {
let nonce = tx1.nonce;

// when
let result = txq.import(TestClient::new(), vec![tx1, tx2].local());
assert_eq!(result, vec![Ok(()), Err(transaction::Error::LimitReached)]);
let r1= txq.import(TestClient::new(), vec![tx1].local());
let r2= txq.import(TestClient::new(), vec![tx2].local());
assert_eq!(r1, vec![Ok(())]);
assert_eq!(r2, vec![Err(transaction::Error::LimitReached)]);
assert_eq!(txq.status().status.transaction_count, 1);

// then
Expand Down

0 comments on commit 17e2a25

Please sign in to comment.