paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.85k stars 673 forks source link

Adjust tests for `nextest` #794

Open alvicsam opened 2 years ago

alvicsam commented 2 years ago

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:

The tests can be run with command:

cargo nextest run --workspace --profile testnet --verbose --locked --features=runtime-benchmarks,runtime-metrics --config-file Cargo.toml
ordian commented 2 years ago

cc @eskimor on dispute-distribution tests

eskimor commented 2 years ago

I'll take care of those during my refactor work on dispute-distribution.

eskimor commented 2 years ago

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.

ordian commented 2 years ago

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?