Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky test cht::segment::tests::drop_many_values under Cargo Tarpaulin #153

Open
tatsuya6502 opened this issue Jun 19, 2022 · 1 comment

Comments

@tatsuya6502
Copy link
Member

Test cht::segment::tests::drop_many_values is failing occasionally when executed under Cargo Tarpaulin. Perhaps the timings of dropping invalidated cache keys are affected by Cargo Tarpaulin in a non-deterministic way (?)

https://app.circleci.com/pipelines/github/moka-rs/moka/520/workflows/ad175a12-9d63-4a20-b10d-d3dad9b78a81/jobs/506

#!/bin/bash -eo pipefail
docker run --security-opt seccomp=unconfined -v "${PWD}:/volume" \
  --env RUSTFLAGS='--cfg circleci' \
  xd009642/tarpaulin \
  cargo tarpaulin -v \
    --features 'sync, future, dash' \
    --ciserver circle-ci \
    --coveralls ${COVERALLS_TOKEN} \
    --timeout 600 \
|| true

...

failures:

---- cht::segment::tests::drop_many_values stdout ----
thread 'cht::segment::tests::drop_many_values' panicked at 'assertion failed: this_key_parent.was_dropped()', src/cht/segment.rs:1448:13
stack backtrace:
   0: rust_begin_unwind
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:143:14
   2: core::panicking::panic
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:48:5
   3: moka::cht::segment::tests::drop_many_values
             at ./src/cht/segment.rs:1448:13
   4: moka::cht::segment::tests::drop_many_values::{{closure}}
             at ./src/cht/segment.rs:1364:5
   5: core::ops::function::FnOnce::call_once
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:227:5
   6: core::ops::function::FnOnce::call_once
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:
    cht::segment::tests::drop_many_values

test result: FAILED. 112 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 45.93s
@tatsuya6502
Copy link
Member Author

I forgot to update this issue. As a workaround, I turned off the assertion when testing with Cargo Tarpaulin: 26dfc91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant