deltadevsde / deltadevsde/prism
testing(prover): fix flaky racy test
- Dominant language
- Rust
- Stars
- 134
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
From CI:
```
FAIL [ 723.486s] prism-prover prover::tests::test_prover_fullnode_commitment_sync_with_racing_transactions
stdout ───
running 1 test
test prover::tests::test_prover_fullnode_commitment_sync_with_racing_transactions has been running for over 60 seconds
test prover::tests::test_prover_fullnode_commitment_sync_with_racing_transactions ... FAILED
failures:
failures:
prover::tests::test_prover_fullnode_commitment_sync_with_racing_transactions
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 10 filtered out; finished in 723.18s
stderr ───
stderr: WARNING: Using insecure random number generator.
stderr: WARNING: Using insecure random number generator.
stderr: WARNING: Using insecure random number generator.
stderr: WARNING: Using insecure random number generator.
thread 'prover::tests::test_prover_fullnode_commitment_sync_with_racing_transactions' panicked at crates/node_types/prover/src/prover/tests/mod.rs:350:37:
called `Result::unwrap()` on an `Err` value: channel lagged by 1
Stack backtrace:
0: >::from
1: ::sync_loop::{closure#0}
2: ::run::{closure#0}::{closure#0}
3: ::run::{closure#0}::{closure#0}, alloc::sync::Arc>>::poll
4: ::run::{closure#0}::{closure#0}, alloc::sync::Arc>>::poll
5: ::enter::<(), ::run_task<(), ::block_on>>>::{closure#0}::{closure#1}>::{closure#0}>
6: >::set::<::enter<::block_on>>>::{closure#0}, core::option::Option<()>>::{closure#0}, (alloc::boxed::Box, core::option::Option<()>)>
7: >::with::, core::option::Option<()>), ::enter<::block_on>>>::{closure#0}, core::option::Option<()>>::{closure#0}>::{closure#0}, (alloc::boxed::Box, core::option::Option<()>)>
8: ::block_on::>>
9: prism_prover::prover::tests::test_prover_fullnode_commitment_sync_with_racing_transactions
10: >::call_once
11: test::__rust_begin_short_backtrace
12: test::run_test::{{closure}}
13: std::sys::backtrace::__rust_begin_short_backtrace
14: core::ops::function::FnOnce::call_once{{vtable.shim}}
15: std::sys::pal::unix::thread::Thread::new::thread_start
16:
17:
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: prism_prover::prover::tests::test_prover_fullnode_commitment_sync_with_racing_transactions::{closure#0}::{closure#1}
4: >>::poll
5: >>::poll
6: ::enter::<(), ::run_task<(), ::block_on>>>::{closure#0}::{closure#1}>::{closure#0}>
7: >::set::<::enter<::block_on>>>::{closure#0}, core::option::Option<()>>::{closure#0}, (alloc::boxed::Box, core::option::Option<()>)>
8: >::with::, core::option::Option<()>), ::enter<::block_on>>>::{closure#0}, core::option::Option<()>>::{closure#0}>::{closure#0}, (alloc::boxed::Box, core::option::Option<()>)>
9: ::block_on::>>
10: prism_prover::prover::tests::test_prover_fullnode_commitment_sync_with_racing_transactions
11: >::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'prover::tests::test_prover_fullnode_commitment_sync_with_racing_transactions' panicked at crates/node_types/prover/src/prover/tests/mod.rs:345:35:
called `Result::unwrap()` on an `Err` value: channel lagged by 110
Stack backtrace:
0: >::from
1: ::sync_loop::{closure#0}
2: ::run::{closure#0}::{closure#0}
3: ::run::{closure#0}::{closure#0}, alloc::sync::Arc>>::poll
4: ::run::{closure#0}::{closure#0}, alloc::sync::Arc>>::poll
5: ::enter::<(), ::run_task<(), ::block_on>>>::{closure#0}::{closure#1}>::{closure#0}>
6: >::set::<::enter<::block_on>>>::{closure#0}, core::option::Option<()>>::{closure#0}, (alloc::boxed::Box, core::option::Option<()>)>
7: >::with::, core::option::Option<()>), ::enter<::block_on>>>::{closure#0}, core::option::Option<()>>::{closure#0}>::{closure#0}, (alloc::boxed::Box, core::option::Option<()>)>
8: ::block_on::>>
9: prism_prover::prover::tests::test_prover_fullnode_commitment_sync_with_racing_transactions
10: >::call_once
11: test::__rust_begin_short_backtrace
12: test::run_test::{{closure}}
13: std::sys::backtrace::__rust_begin_short_backtrace
14: core::ops::function::FnOnce::call_once{{vtable.shim}}
15: std::sys::pal::unix::thread::Thread::new::thread_start
16:
17:
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: prism_prover::prover::tests::test_prover_fullnode_commitment_sync_with_racing_transactions::{closure#0}::{closure#0}
4: >>::poll
5: >>::poll
6: ::enter::<(), ::run_task<(), ::block_on>>>::{closure#0}::{closure#1}>::{closure#0}>
7: >::set::<::enter<::block_on>>>::{closure#0}, core::option::Option<()>>::{closure#0}, (alloc::boxed::Box, core::option::Option<()>)>
8: >::with::, core::option::Option<()>), ::enter<::block_on>>>::{closure#0}, core::option::Option<()>>::{closure#0}>::{closure#0}, (alloc::boxed::Box, core::option::Option<()>)>
9: ::block_on::>>
10: prism_prover::prover::tests::test_prover_fullnode_commitment_sync_with_racing_transactions
11: >::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'prover::tests::test_prover_fullnode_commitment_sync_with_racing_transactions' panicked at crates/node_types/prover/src/prover/tests/mod.rs:420:5:
assertion `left == right` failed: Prover and fullnode should have matching commitments even with racing transactions
left: CommitmentResponse { commitment: Digest([162, 252, 221, 79, 119, 188, 143, 127, 205, 88, 254, 95, 103, 3, 179, 176, 164, 234, 226, 129, 165, 205, 54, 220, 84, 71, 71, 63, 183, 39, 253, 1]) }
right: CommitmentResponse { commitment: Digest([120, 24, 222, 250, 130, 230, 210, 5, 180, 116, 235, 224, 200, 79, 58, 254, 134, 9, 12, 150, 209, 159, 161, 72, 85, 99, 199, 74, 60, 70, 80, 22]) }
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::assert_failed_inner
3: core::panicking::assert_failed::
4: prism_prover::prover::tests::test_prover_fullnode_commitment_sync_with_racing_transactions::{closure#0}
5: ::enter::, ::block_on>>>::{closure#0}::{closure#0}>
6: >::set::<::enter<::block_on>>>::{closure#0}, core::option::Option<()>>::{closure#0}, (alloc::boxed::Box, core::option::Option<()>)>
7: >::with::, core::option::Option<()>), ::enter<::block_on>>>::{closure#0}, core::option::Option<()>>::{closure#0}>::{closure#0}, (alloc::boxed::Box, core::option::Option<()>)>
8: ::block_on::>>
9: prism_prover::prover::tests::test_prover_fullnode_commitment_sync_with_racing_transactions
10: >::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```
Contributor guide
Assessment
This issue has not been assessed yet.