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

FifoCache unable to solve the unremoved result in keyList. #2934

Closed
cflxl opened this issue Aug 18, 2023 · 0 comments
Closed

FifoCache unable to solve the unremoved result in keyList. #2934

cflxl opened this issue Aug 18, 2023 · 0 comments

Comments

@cflxl
Copy link
Contributor

cflxl commented Aug 18, 2023

MyBatis version

3.4.6

Database vendor and version

No Database

Test case or example project

I add below code in FifoCacheTest but failed.

@Test
  void shouldRiseConflictInBeyondFiveEntries() {
    FifoCache cache = new FifoCache(new PerpetualCache("default"));
    cache.setSize(5);
    for (int i = 0; i < 5; i++) {
      cache.putObject(i, i);
    }
    cache.removeObject(1);
    cache.putObject(1,1);
    assertNotNull(cache.getObject(0));
  }

Steps to reproduce

clone above code then run the maven test

Expected result

not null

Actual result

failed

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

2 participants