mockito: Shutdown race condition
Description
It seems that mockito has a race condition during shutdowns in async environments with many tests. This is a new issue in version 0.32.
Reproducer
I wasn’t able to find a minimal version. However here is a public version:
Run:
$ RUST_BACKTRACE=1 RUST_LOG=debug LOG_FILTER=debug cargo test -p influxdb2_client -- --nocapture
...
2023-02-13T14:20:25.722030Z ERROR hyper::server::tcp: accept error: A Tokio 1.x context was found, but it is being shutdown.
...
The same error repeats multiple times and many tests never finish.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (7 by maintainers)
Fixed, thanks! 😃
@lipanski Yes, now it works without problems: https://gitlab.com/ogarcia/lesspass-client/-/jobs/3788571555
@crepererum @demoray @ogarcia please give 0.32.3 a try - it should address your issues.
@crepererum that worked and I managed to reproduce the issue.
This PR updates the test to 0.32.0, including the forget to preclude the
Mock::drop
calls. https://github.com/Azure/azure-sdk-for-rust/pull/1212If you want to run just this unit test, check out the repo and run the following:
cargo test --all -p azure_iot_deviceupdate can_import_update
@crepererum can you try running it with this commit?