mirror of https://github.com/apache/cassandra
ninja: fix tests after CASSANDRA-21074 landed
This commit is contained in:
parent
b08da36770
commit
3c69bd2367
|
|
@ -101,9 +101,10 @@ public class CompressionMetadataTest
|
|||
byte[] dictBytes = "sample dictionary data for compression".getBytes();
|
||||
ZstdCompressionDictionary dictionary = new ZstdCompressionDictionary(dictId, dictBytes);
|
||||
|
||||
assertThat(dictionary.selfRef().globalCount()).isOne();
|
||||
assertThat(dictionary.selfRef()).isNull();
|
||||
CompressionDictionaryCache cache = new CompressionDictionaryCache();
|
||||
cache.add(dictionary);
|
||||
assertThat(dictionary.selfRef().globalCount()).isOne();
|
||||
|
||||
// Verify dictionary is in cache
|
||||
CompressionDictionary cachedDict = cache.get(dictId);
|
||||
|
|
@ -187,10 +188,12 @@ public class CompressionMetadataTest
|
|||
byte[] dictBytes = "shared dictionary data".getBytes();
|
||||
ZstdCompressionDictionary dictionary = new ZstdCompressionDictionary(dictId, dictBytes);
|
||||
|
||||
assertThat(dictionary.selfRef().globalCount()).isOne();
|
||||
assertThat(dictionary.selfRef()).isNull();
|
||||
CompressionDictionaryCache cache = new CompressionDictionaryCache();
|
||||
cache.add(dictionary);
|
||||
|
||||
assertThat(dictionary.selfRef().globalCount()).isOne();
|
||||
|
||||
// Create multiple CompressionMetadata instances (simulating multiple SSTables)
|
||||
Memory memory1 = Memory.allocate(100);
|
||||
CompressionMetadata metadata1 = new CompressionMetadata(
|
||||
|
|
|
|||
|
|
@ -281,6 +281,7 @@ public class ZstdDictionaryCompressorTest
|
|||
{
|
||||
ZstdDictionaryCompressor.invalidateCache();
|
||||
ZstdCompressionDictionary closedDict = createTestDictionary();
|
||||
closedDict.initRefLazily();
|
||||
closedDict.close();
|
||||
|
||||
// This should throw IllegalStateException
|
||||
|
|
|
|||
Loading…
Reference in New Issue