This is an automated email from the ASF dual-hosted git repository.
dcapwell pushed a commit to branch cep-15-accord
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/cep-15-accord by this push:
new 3b9b866460 Ninja for CASSANDRA-20403: KeySerializersTest would NPE due
to partitioner not being setup. The first example is the empty range so no
updates to the static partitioner is done which leads to this NPE
3b9b866460 is described below
commit 3b9b8664607b319592628f0187e835b481738d79
Author: David Capwell <[email protected]>
AuthorDate: Fri Mar 14 09:16:59 2025 -0700
Ninja for CASSANDRA-20403: KeySerializersTest would NPE due to partitioner
not being setup. The first example is the empty range so no updates to the
static partitioner is done which leads to this NPE
---
.../cassandra/service/accord/serializers/KeySerializersTest.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/test/unit/org/apache/cassandra/service/accord/serializers/KeySerializersTest.java
b/test/unit/org/apache/cassandra/service/accord/serializers/KeySerializersTest.java
index f1a9fe96aa..5b1d5ca42e 100644
---
a/test/unit/org/apache/cassandra/service/accord/serializers/KeySerializersTest.java
+++
b/test/unit/org/apache/cassandra/service/accord/serializers/KeySerializersTest.java
@@ -23,6 +23,7 @@ import org.junit.Test;
import accord.primitives.Ranges;
import accord.utils.Gen;
import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.dht.Murmur3Partitioner;
import org.apache.cassandra.io.Serializers;
import org.apache.cassandra.io.util.DataOutputBuffer;
import org.apache.cassandra.utils.AccordGenerators;
@@ -35,6 +36,8 @@ public class KeySerializersTest
static
{
DatabaseDescriptor.clientInitialization();
+ // If the first example is "[]" then need a partitioner for static init
+ DatabaseDescriptor.setPartitionerUnsafe(Murmur3Partitioner.instance);
}
@Test
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]