Skip to content

Commit a347d7c

Browse files
committed
Tweak maximumSize test in CaffeineClientSideCacheTest
1 parent 103575d commit a347d7c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/java/redis/clients/jedis/csc/CaffeineClientSideCacheTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void individualCommandsAndThenStats() {
5858
@Test
5959
public void maximumSize() {
6060
final long maxSize = 10;
61-
final long maxEstimatedSize = 40;
61+
final long maxEstimatedSize = 42;
6262
int count = 1000;
6363
for (int i = 0; i < count; i++) {
6464
control.set("k" + i, "v" + i);
@@ -68,10 +68,10 @@ public void maximumSize() {
6868
try (JedisPooled jedis = new JedisPooled(hnp, clientConfig.get(), new CaffeineClientSideCache(caffeine))) {
6969
for (int i = 0; i < count; i++) {
7070
jedis.get("k" + i);
71-
assertThat(caffeine.estimatedSize(), Matchers.lessThan(maxEstimatedSize));
71+
assertThat(caffeine.estimatedSize(), Matchers.lessThanOrEqualTo(maxEstimatedSize));
7272
}
7373
}
74-
assertThat(caffeine.stats().evictionCount(), Matchers.greaterThan(count - maxEstimatedSize));
74+
assertThat(caffeine.stats().evictionCount(), Matchers.greaterThanOrEqualTo(count - maxEstimatedSize));
7575
}
7676

7777
@Test

0 commit comments

Comments
 (0)