Merge branch 'cassandra-5.0' into trunk

* cassandra-5.0:
  Fix KeyCacheTest for cases when early open is disabled
This commit is contained in:
Jacek Lewandowski 2023-11-08 09:28:23 +01:00
commit 37d2ef11d6
1 changed files with 2 additions and 3 deletions

View File

@ -340,12 +340,11 @@ public class KeyCacheTest
throw new IllegalStateException();
Util.compactAll(cfs, Integer.MAX_VALUE).get();
boolean noEarlyOpen = DatabaseDescriptor.getSSTablePreemptiveOpenIntervalInMiB() < 0;
// after compaction cache should have entries for new SSTables,
// but since we have kept a reference to the old sstables,
// if we had 2 keys in cache previously it should become 4
assertKeyCacheSize(noEarlyOpen ? 2 : 4, KEYSPACE1, cf);
assertKeyCacheSize(4, KEYSPACE1, cf);
refs.release();
@ -358,7 +357,7 @@ public class KeyCacheTest
Util.getAll(Util.cmd(cfs, "key1").build());
Util.getAll(Util.cmd(cfs, "key2").build());
assertKeyCacheSize(noEarlyOpen ? 4 : 2, KEYSPACE1, cf);
assertKeyCacheSize( 2, KEYSPACE1, cf);
}
@Test