Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix flaky unit test test_optimal_message_selection3 #1369

Closed
noot opened this issue Jan 12, 2022 · 1 comment · Fixed by #1397
Closed

fix flaky unit test test_optimal_message_selection3 #1369

noot opened this issue Jan 12, 2022 · 1 comment · Fixed by #1397
Labels
Priority: 3 - Medium Nice-to-have, does not impede core functionality

Comments

@noot
Copy link
Contributor

noot commented Jan 12, 2022

Task summary

this unit test occasionally fails (both locally and on CI):

test msgpool::selection::test_selection::test_optimal_message_selection3 ... FAILED

failures:

---- msgpool::selection::test_selection::test_optimal_message_selection3 stdout ----
thread 'msgpool::selection::test_selection::test_optimal_message_selection3' panicked at 'assertion failed: `(left == right)`
  left: `1677`,
 right: `1437`: Expected 1437 messages, but got 1677', blockchain/message_pool/src/msgpool/selection.rs:1305:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    msgpool::selection::test_selection::test_optimal_message_selection3

this task is to make this test consistent and not fail.

Specification reference

Other information and links

@noot noot added the Status: Needs Triage Issue has unresolved discussions and/or needs to be assigned a priority and assignee label Jan 12, 2022
@q9f q9f added the Priority: 3 - Medium Nice-to-have, does not impede core functionality label Jan 13, 2022
q9f added a commit to q9f/forest that referenced this issue Jan 13, 2022
@lemmih
Copy link
Contributor

lemmih commented Jan 13, 2022

Here's a bit of background information for anyone wanting to dive deeper. Command to run just the flaky test:

cargo test --release --lib --features "networks/mainnet" -p message_pool -- test_optimal_message_selection3

Couldn't trigger the failure on my M1 mac. On Linux (with a 3950X), the failure happens roughly in 1 out of 10 runs.

@lerajk lerajk removed the Status: Needs Triage Issue has unresolved discussions and/or needs to be assigned a priority and assignee label Jan 13, 2022
@lerajk lerajk unassigned noot Jan 17, 2022
q9f added a commit that referenced this issue Jan 18, 2022
* ci: run github actions on os matrix

* ci: deduplicate github workflows

* ci: add nightly workflow

* ci: add binary install step

* ci: further deduplicate work

* ci: purge circleci

* ci: run tools on msrv

* ci: use gh pages deploy action

* scripts: remove docs script

* docs: update readme

* github: update codeowners

* ci: enable codecov

* ci: fix syntax

* docs: restore badges

* ci: purge codecov config

* ci: use tarpaulin to gather coverage

* ci: move coverage to dedicated job

* ci: enable buildjet runners

* ci: reduce matrix for testing

* ci: fix syntax

* make: parallelize tests

* ci: ignore clippy::redundant-clone

* ci: add dependencies

* ci: attempt multiple runners

* ci: remove broken cache step

* ci: reenable macos

* make: fix test

* ci: automatically cancel previous runs

* blockchain/msgpool: disable flaky test, ref #1369

* ci: increase tarpaulin timeout

* ci: add rust caching action

* blockchain/msgpool: disable more flaky tests, ref #1369

* blockchain/msgpool: disable more flaky tests, ref #1369

* make: make sure tests run in release mode

* blockchain/msg_pool: reenable tests in release mode

* ci: remove msrv = stable

* make: ignore clippy::to-string-in-format-args

* ci: further reduce test threads

* ci: add build matrix for low priority jobs

* ci: further optimize threads

* chore: clean up

* cargo: add dev profile without debug symbols

* ci: populate environment

* ci: fix profile

* ci: nit

* ci: enable incremental builds

* ci: resolve merge of #1365

* ci: progressively cache all rust jobs

* ci: fix gh pages action version string

* ci: fix docs job dry-run condition

* make: remove resolved clippy exceptions

* ci: remove redundancy in docs job
@willeslau willeslau mentioned this issue Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 3 - Medium Nice-to-have, does not impede core functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants