polkadot
polkadot copied to clipboard
Adjust tests for `nextest`
If cargo nextest is used in the test-linux-stable job - it can be up to 2x faster.
But currently some tests don't work with nextest: https://gitlab.parity.io/parity/mirrors/polkadot/-/jobs/1744835
It would be nice to adjust them so we can use cargo nextest in the CI pipeline.
The list of failed tests:
- polkadot::benchmark_storage_works benchmark_storage_works
- polkadot-dispute-distribution tests::received_request_triggers_import
- polkadot-dispute-distribution tests::send_dispute_sends_dispute
- polkadot-dispute-distribution tests::disputes_are_recovered_at_startup
- polkadot-dispute-distribution tests::dispute_retries_and_works_across_session_boundaries
- polkadot-dispute-distribution tests::send_dispute_gets_cleaned_up
- polkadot::benchmark_block benchmark_block_works
The tests can be run with command:
cargo nextest run --workspace --profile testnet --verbose --locked --features=runtime-benchmarks,runtime-metrics --config-file Cargo.toml
cc @eskimor on dispute-distribution tests
I'll take care of those during my refactor work on dispute-distribution.
All dispute coordinator tests pass for me.
cargo nextest run --profile testnet --verbose --locked --config-file Cargo.toml -p polkadot-dispute-distribution
Currently running full workspace tests to double check.
In general, things like https://github.com/paritytech/polkadot/blob/d4d648e5781b6fefd83b3a22bf5a3914e460fc3f/node/network/dispute-distribution/src/tests/mod.rs#L421-L422 looks extremely flaky. Try running this test while compiling another copy of polkadot or other heavy load.
Is it possible rewrite the tests not to rely on these delays?