You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When run test with cargo test -p restate-bifrost --lib -- --nocapture --test-threads=1, it failed:
test bifrost::tests::trim_log_smoke_test ... !!!! Runnning with test-util enabled !!!!
2025-03-07T09:32:12.849393Z TRACE restate_bifrost::service: Starting loglet provider local
2025-03-07T09:32:12.849465Z ERROR restate_bifrost::service: Failed to start loglet provider local: system is shutting down
thread 'bifrost::tests::trim_log_smoke_test' panicked at crates/bifrost/src/bifrost.rs:104:14:
in memory loglet must start: Failed to start loglet provider local: system is shutting down
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The text was updated successfully, but these errors were encountered:
This is probably caused by cargo test not splitting individual tests into individual processes but reusing the process. We still have a few globals like the DB_MANAGER (
). That's why we use nextest to run our tests. Try cargo nextest run --all-features --target-dir target/tests -p restate-bifrost and let me know whether the tests are now passing.
This is probably caused by cargo test not splitting individual tests into individual processes but reusing the process. We still have a few globals like the DB_MANAGER (
static DB_MANAGER: OnceLock = OnceLock::new();
). That's why we use nextest to run our tests. Try cargo nextest run --all-features --target-dir target/tests -p restate-bifrost and let me know whether the tests are now passing.
Yep, it's caused by DB_MANAGER was a global variables and reused by multi testcase, so all the testcases interfered with each other. Use nextest didn't reproduced this issue.
Is there any plan to reform the use of global variables?
When run test with
cargo test -p restate-bifrost --lib -- --nocapture --test-threads=1
, it failed:The text was updated successfully, but these errors were encountered: