diff --git a/solr/core/src/test/org/apache/solr/search/TestCaffeineCache.java b/solr/core/src/test/org/apache/solr/search/TestCaffeineCache.java index 87ff29d5e6a..b4c69600fbd 100644 --- a/solr/core/src/test/org/apache/solr/search/TestCaffeineCache.java +++ b/solr/core/src/test/org/apache/solr/search/TestCaffeineCache.java @@ -308,7 +308,7 @@ public void testRamBytesSync() throws IOException { cache.put(0, "test"); long nonEmptySize = cache.ramBytesUsed(); - cache.put(0, "test"); + cache.put(0, random().nextBoolean() ? "test" : "rest"); assertEquals(nonEmptySize, cache.ramBytesUsed()); cache.remove(0); @@ -341,7 +341,7 @@ public void testRamBytesAsync() throws IOException { cache.put(0, "test"); long nonEmptySize = cache.ramBytesUsed(); - cache.put(0, "test"); + cache.put(0, random().nextBoolean() ? "test" : "rest"); assertEquals(nonEmptySize, cache.ramBytesUsed()); cache.remove(0);