Open jancionear opened 1 month ago
The same thing happens with the standard cargo test
, so it's not a nextest
issue:
cargo test -p integration-tests test_client_with_simple_test_loop -- --nocapture
<hangs>
I think this is a known issue? Confirming with @robin-near, if these are the same? https://github.com/near/nearcore/issues/11447
I remember @tayfunelmas might have looked into a similar issue?
This could be an issue similar to what is addressed #11653, where some code blocks on a message that never arrives due to the panic making the message-sender fail to send it.
TestLoopV2::run_until
runs testloop until the condition is met or it hits the timeout. In case of a timeout,run_until
panics and the test should fail.I've observed that when
run_until
panics, the test doesn't stop. It just hangs until it reaches the timeout.For example, running
On this branch, where the test is modified to fail inside
run_until
, will hang.Running with the
--nocapture
flag shows that the panic is triggered, but the test doesn't stop.Attaching gdb to the hanged process shows that it's waiting on some mutex. It looks like it's related to waiting for the test to be completed, not sure:
Maybe panicking causes the
event::CompletedTest
event to not be sent? It's weird, tests should be allowed to panic :thinking:/cc @robin-near @shreyan-gupta