Skip to content

Commit b83b2c9

Browse files
committed
all accord tests now ignore journal issue
1 parent 35dc006 commit b83b2c9

7 files changed

+33
-24
lines changed

test/distributed/org/apache/cassandra/distributed/test/cql3/AccordInteropMultiNodeTableWalkBase.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
package org.apache.cassandra.distributed.test.cql3;
2020

21+
import accord.utils.Property;
2122
import accord.utils.RandomSource;
2223
import org.apache.cassandra.distributed.Cluster;
2324
import org.apache.cassandra.distributed.api.ConsistencyLevel;
@@ -31,6 +32,12 @@ public AccordInteropMultiNodeTableWalkBase(TransactionalMode transactionalMode)
3132
super(transactionalMode);
3233
}
3334

35+
@Override
36+
protected void preCheck(Cluster cluster, Property.StatefulBuilder builder)
37+
{
38+
AccordInteropSingleNodeTableWalkBase.addUncaughtExceptionsFilter(cluster);
39+
}
40+
3441
@Override
3542
protected State createState(RandomSource rs, Cluster cluster)
3643
{

test/distributed/org/apache/cassandra/distributed/test/cql3/AccordInteropSingleNodeTableWalkBase.java

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,28 @@ public AccordInteropSingleNodeTableWalkBase(TransactionalMode transactionalMode)
3434
@Override
3535
protected void preCheck(Cluster cluster, Property.StatefulBuilder builder)
3636
{
37-
// if a failing seed is detected, populate here
38-
// Example: builder.withSeed(42L);
39-
// CQL operations may have opertors such as +, -, and / (example 4 + 4), to "apply" them to get a constant value
40-
// CQL_DEBUG_APPLY_OPERATOR = true;
37+
addUncaughtExceptionsFilter(cluster);
38+
}
39+
40+
static void addUncaughtExceptionsFilter(Cluster cluster)
41+
{
42+
cluster.setUncaughtExceptionsFilter(t -> {
43+
// There is a known issue with drop table and journal snapshots where the journal can't find the given table...
44+
// To make these tests stable need to ignore this error as it's unrelated to the test and is target to be fixed
45+
// directly.
46+
/*
47+
Suppressed: java.lang.AssertionError: Unknown keyspace ks12
48+
at org.apache.cassandra.db.Keyspace.open(Keyspace.java:149)
49+
at org.apache.cassandra.db.Keyspace.openAndGetStoreIfExists(Keyspace.java:172)
50+
at org.apache.cassandra.service.accord.AccordDataStore.lambda$snapshot$2(AccordDataStore.java:104)
51+
*/
52+
53+
if (t instanceof AssertionError
54+
&& t.getMessage() != null
55+
&& t.getMessage().startsWith("Unknown keyspace ks"))
56+
return true;
57+
return false;
58+
});
4159
}
4260

4361
@Override

test/distributed/org/apache/cassandra/distributed/test/cql3/AccordInteropSingleNodeTokenConflictTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,12 @@
1818

1919
package org.apache.cassandra.distributed.test.cql3;
2020

21-
import org.junit.Ignore;
22-
2321
import accord.utils.Property;
2422
import accord.utils.RandomSource;
2523
import org.apache.cassandra.distributed.Cluster;
2624
import org.apache.cassandra.distributed.api.ConsistencyLevel;
2725
import org.apache.cassandra.service.consensus.TransactionalMode;
2826

29-
@Ignore
3027
public class AccordInteropSingleNodeTokenConflictTest extends SingleNodeTokenConflictTest
3128
{
3229
public AccordInteropSingleNodeTokenConflictTest()

test/distributed/org/apache/cassandra/distributed/test/cql3/FullAccordInteropMultiNodeTableWalkTest.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,7 @@ public FullAccordInteropMultiNodeTableWalkTest()
3232
@Override
3333
protected void preCheck(Cluster cluster, Property.StatefulBuilder builder)
3434
{
35-
cluster.setUncaughtExceptionsFilter(t -> {
36-
// There is a known issue with drop table and journal snapshots where the journal can't find the given table...
37-
// To make these tests stable need to ignore this error as it's unrelated to the test and is target to be fixed
38-
// directly.
39-
/*
40-
Suppressed: java.lang.AssertionError: Unknown keyspace ks12
41-
at org.apache.cassandra.db.Keyspace.open(Keyspace.java:149)
42-
at org.apache.cassandra.db.Keyspace.openAndGetStoreIfExists(Keyspace.java:172)
43-
at org.apache.cassandra.service.accord.AccordDataStore.lambda$snapshot$2(AccordDataStore.java:104)
44-
*/
45-
46-
if (t instanceof AssertionError
47-
&& t.getMessage() != null
48-
&& t.getMessage().startsWith("Unknown keyspace ks"))
49-
return true;
50-
return false;
51-
});
35+
super.preCheck(cluster, builder);
5236
// if a failing seed is detected, populate here
5337
// Example: builder.withSeed(42L);
5438
// CQL operations may have opertors such as +, -, and / (example 4 + 4), to "apply" them to get a constant value

test/distributed/org/apache/cassandra/distributed/test/cql3/FullAccordInteropSingleNodeTableWalkTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public FullAccordInteropSingleNodeTableWalkTest()
3232
@Override
3333
protected void preCheck(Cluster cluster, Property.StatefulBuilder builder)
3434
{
35+
super.preCheck(cluster, builder);
3536
// if a failing seed is detected, populate here
3637
// Example: builder.withSeed(42L);
3738
// CQL operations may have opertors such as +, -, and / (example 4 + 4), to "apply" them to get a constant value

test/distributed/org/apache/cassandra/distributed/test/cql3/MixedReadsAccordInteropMultiNodeTableWalkTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public MixedReadsAccordInteropMultiNodeTableWalkTest()
3232
@Override
3333
protected void preCheck(Cluster cluster, Property.StatefulBuilder builder)
3434
{
35+
super.preCheck(cluster, builder);
3536
// if a failing seed is detected, populate here
3637
// Example: builder.withSeed(42L);
3738
// CQL operations may have opertors such as +, -, and / (example 4 + 4), to "apply" them to get a constant value

test/distributed/org/apache/cassandra/distributed/test/cql3/MixedReadsAccordInteropSingleNodeTableWalkTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public MixedReadsAccordInteropSingleNodeTableWalkTest()
3232
@Override
3333
protected void preCheck(Cluster cluster, Property.StatefulBuilder builder)
3434
{
35+
super.preCheck(cluster, builder);
3536
// if a failing seed is detected, populate here
3637
// Example: builder.withSeed(42L);
3738
// CQL operations may have opertors such as +, -, and / (example 4 + 4), to "apply" them to get a constant value

0 commit comments

Comments
 (0)