Skip to content

Commit

Permalink
#5: Allow configuration of max and default page limit
Browse files Browse the repository at this point in the history
Fix test
  • Loading branch information
georgiosgratsias committed Nov 25, 2020
1 parent d8dac2e commit c5b038d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,13 @@ public void test() {
assertThat(impl.findAll(querySpec)).hasSize(1);

// entry expired, but garbage collection will not run
impl.lastGc = Instant.now().minus(Duration.ofMillis(5000));
flow.setLastModified(Instant.now().plus(Duration.ofMillis(5000)));
impl.checkGc();
assertThat(impl.findAll(querySpec)).hasSize(1);

// garbage collection not run for a long time and will finally collect
impl.lastGc = Instant.now().minus(Duration.ofMillis(5000));
flow.setLastModified(Instant.now().minus(Duration.ofMillis(5000)));
impl.checkGc();
assertThat(impl.findAll(querySpec)).isEmpty();
Expand Down

0 comments on commit c5b038d

Please sign in to comment.