Skip to content

Commit

Permalink
Soften assertions for aspects of the test that are independent of the…
Browse files Browse the repository at this point in the history
… strict contract that the ExpiringSubstitutableItemPool defines.

Signed-off-by: Greg Schohn <[email protected]>
  • Loading branch information
gregschohn committed Aug 14, 2023
1 parent ad90293 commit f4392ce
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ void get() throws Exception {
.map(i->i.toString()).collect(Collectors.joining(",")));

expirationsAreDoneFuture.complete(true);
Assertions.assertEquals(5, pool.getStats().getNItemsCreated());
Assertions.assertTrue(pool.getStats().getNItemsCreated() >= 5);
Assertions.assertEquals(0, pool.getStats().getNColdGets());
Assertions.assertEquals(1, pool.getStats().getNHotGets());
Assertions.assertEquals(4, pool.getStats().getNItemsExpired());
Assertions.assertTrue(pool.getStats().getNItemsExpired() >= 4);

for (int i=1; i<=NUM_POOLED_ITEMS*2; ++i) {
log.info("Pool=" + pool);
Expand Down

0 comments on commit f4392ce

Please sign in to comment.