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

CI: Stabilize ensure_gc_runs_when_dropping_cache test for sync::Cache #387

Merged
merged 2 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ jobs:
command: test
args: --release --lib --features sync sync::segment::tests::drop_value_immediately_after_eviction -- --exact --ignored

- name: Run tests (sync feature, drop cache)
uses: actions-rs/cargo@v1
with:
command: test
args: --release --lib --features sync sync::cache::tests::ensure_gc_runs_when_dropping_cache -- --exact --ignored

- name: Run tests (future feature, but no sync feature)
uses: actions-rs/cargo@v1
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/CIQuantaDisabled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,9 @@ jobs:
with:
command: test
args: --no-default-features --features 'sync, future, atomic64, logging'

- name: Run tests (sync feature, but no quanta feature, drop cache)
uses: actions-rs/cargo@v1
with:
command: test
args: --release --lib --no-default-features --features sync sync::cache::tests::ensure_gc_runs_when_dropping_cache -- --exact --ignored
6 changes: 6 additions & 0 deletions .github/workflows/LinuxCrossCompileTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,9 @@ jobs:
run: |
cross ${{ matrix.platform.cargo-version }} test --release -F future \
--target ${{ matrix.platform.target }} ${{ matrix.platform.cargo-opts }}

- name: Run tests (sync feature, drop cache)
run: |
cross ${{ matrix.platform.cargo-version }} test --release -F sync \
--target ${{ matrix.platform.target }} ${{ matrix.platform.cargo-opts }} \
--lib sync::cache::tests::ensure_gc_runs_when_dropping_cache -- --exact --ignored
6 changes: 5 additions & 1 deletion src/sync/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3456,7 +3456,7 @@
// Note that MyError does not implement std::error::Error trait like
// anyhow::Error.
#[derive(Debug)]
pub struct MyError(String);

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3459 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

type MyResult<T> = Result<T, Arc<MyError>>;

Expand Down Expand Up @@ -3597,7 +3597,7 @@
// Note that MyError does not implement std::error::Error trait like
// anyhow::Error.
#[derive(Debug)]
pub struct MyError(String);

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

Check warning on line 3600 in src/sync/cache.rs

View workflow job for this annotation

GitHub Actions / test (nightly)

field `0` is never read

type MyResult<T> = Result<T, Arc<MyError>>;

Expand Down Expand Up @@ -4831,8 +4831,12 @@
assert_eq!(counters.value_dropped(), KEYS, "value_dropped");
}

// https://github.com/moka-rs/moka/issues/383
// For testing the issue reported by: https://github.com/moka-rs/moka/issues/383
//
// Ignored by default. This test becomes unstable when run in parallel with
// other tests.
#[test]
#[ignore]
fn ensure_gc_runs_when_dropping_cache() {
let cache = Cache::builder().build();
let val = Arc::new(0);
Expand Down
Loading