diff --git a/test/distributed/org/apache/cassandra/distributed/test/ReadRepairEmptyRangeTombstonesTest.java b/test/distributed/org/apache/cassandra/distributed/test/ReadRepairEmptyRangeTombstonesTestBase.java similarity index 95% rename from test/distributed/org/apache/cassandra/distributed/test/ReadRepairEmptyRangeTombstonesTest.java rename to test/distributed/org/apache/cassandra/distributed/test/ReadRepairEmptyRangeTombstonesTestBase.java index 6cdea9b5b0..fa066e8b37 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/ReadRepairEmptyRangeTombstonesTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/ReadRepairEmptyRangeTombstonesTestBase.java @@ -42,7 +42,7 @@ import static org.apache.cassandra.distributed.shared.AssertUtils.row; * See CASSANDRA-15924. */ @RunWith(Parameterized.class) -public class ReadRepairEmptyRangeTombstonesTest extends TestBaseImpl +public abstract class ReadRepairEmptyRangeTombstonesTestBase extends TestBaseImpl { private static final int NUM_NODES = 2; @@ -58,39 +58,34 @@ public class ReadRepairEmptyRangeTombstonesTest extends TestBaseImpl @Parameterized.Parameter(1) public int coordinator; - /** - * Whether to flush data after mutations - */ - @Parameterized.Parameter(2) - public boolean flush; - /** * Whether paging is used for the distributed queries */ - @Parameterized.Parameter(3) + @Parameterized.Parameter(2) public boolean paging; /** * Whether the clustering order is reverse */ - @Parameterized.Parameter(4) + @Parameterized.Parameter(3) public boolean reverse; - @Parameterized.Parameters(name = "{index}: strategy={0} coordinator={1} flush={2} paging={3} reverse={4}") + @Parameterized.Parameters(name = "{index}: strategy={0} coordinator={1} paging={2} reverse={3}") public static Collection data() { List result = new ArrayList<>(); for (int coordinator = 1; coordinator <= NUM_NODES; coordinator++) - for (boolean flush : BOOLEANS) - for (boolean paging : BOOLEANS) - for (boolean reverse : BOOLEANS) - result.add(new Object[]{ ReadRepairStrategy.BLOCKING, coordinator, flush, paging, reverse }); - result.add(new Object[]{ ReadRepairStrategy.NONE, 1, false, false, false }); + for (boolean paging : BOOLEANS) + for (boolean reverse : BOOLEANS) + result.add(new Object[]{ ReadRepairStrategy.BLOCKING, coordinator, paging, reverse }); + result.add(new Object[]{ ReadRepairStrategy.NONE, 1, false, false }); return result; } private static Cluster cluster; + protected abstract boolean flush(); + @BeforeClass public static void setupCluster() throws IOException { @@ -255,7 +250,7 @@ public class ReadRepairEmptyRangeTombstonesTest extends TestBaseImpl private Tester tester() { - return new Tester(cluster, strategy, coordinator, flush, paging, reverse); + return new Tester(cluster, strategy, coordinator, flush(), paging, reverse); } private static class Tester extends ReadRepairTester diff --git a/test/distributed/org/apache/cassandra/distributed/test/ReadRepairEmptyRangeTombstonesWithFlushesTest.java b/test/distributed/org/apache/cassandra/distributed/test/ReadRepairEmptyRangeTombstonesWithFlushesTest.java new file mode 100644 index 0000000000..3447f82372 --- /dev/null +++ b/test/distributed/org/apache/cassandra/distributed/test/ReadRepairEmptyRangeTombstonesWithFlushesTest.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.cassandra.distributed.test; + +public class ReadRepairEmptyRangeTombstonesWithFlushesTest extends ReadRepairEmptyRangeTombstonesTestBase +{ + @Override + protected boolean flush() + { + return true; + } +} diff --git a/test/distributed/org/apache/cassandra/distributed/test/ReadRepairEmptyRangeTombstonesWithoutFlushesTest.java b/test/distributed/org/apache/cassandra/distributed/test/ReadRepairEmptyRangeTombstonesWithoutFlushesTest.java new file mode 100644 index 0000000000..68d0d90129 --- /dev/null +++ b/test/distributed/org/apache/cassandra/distributed/test/ReadRepairEmptyRangeTombstonesWithoutFlushesTest.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.cassandra.distributed.test; + +public class ReadRepairEmptyRangeTombstonesWithoutFlushesTest extends ReadRepairEmptyRangeTombstonesTestBase +{ + @Override + protected boolean flush() + { + return false; + } +} diff --git a/test/distributed/org/apache/cassandra/distributed/test/log/ConsistentLeaveTest.java b/test/distributed/org/apache/cassandra/distributed/test/log/ConsistentLeaveTest.java index 09b11916a4..18b36b2875 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/log/ConsistentLeaveTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/log/ConsistentLeaveTest.java @@ -56,7 +56,7 @@ import static org.junit.Assert.assertFalse; public class ConsistentLeaveTest extends FuzzTestBase { - private static int WRITES = 2000; + private static int WRITES = 500; @Test public void decommissionTest() throws Throwable diff --git a/test/distributed/org/apache/cassandra/distributed/test/log/ConsistentMoveTest.java b/test/distributed/org/apache/cassandra/distributed/test/log/ConsistentMoveTest.java index 57b330adb8..505c8daa72 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/log/ConsistentMoveTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/log/ConsistentMoveTest.java @@ -59,7 +59,7 @@ import static org.junit.Assert.assertTrue; public class ConsistentMoveTest extends FuzzTestBase { - private static int WRITES = 2000; + private static int WRITES = 500; @Test public void moveTest() throws Throwable diff --git a/test/distributed/org/apache/cassandra/distributed/test/log/FailedLeaveTest.java b/test/distributed/org/apache/cassandra/distributed/test/log/FailedLeaveTest.java index a22eb09167..ddc102e80b 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/log/FailedLeaveTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/log/FailedLeaveTest.java @@ -63,7 +63,7 @@ import static org.apache.cassandra.distributed.shared.ClusterUtils.getSequenceAf public class FailedLeaveTest extends FuzzTestBase { - private static int WRITES = 2000; + private static int WRITES = 500; @Test public void resumeDecommissionWithStreamingFailureTest() throws Throwable diff --git a/test/distributed/org/apache/cassandra/distributed/test/log/ResumableStartupTest.java b/test/distributed/org/apache/cassandra/distributed/test/log/ResumableStartupTest.java index 2c52ea20f1..7a9858f4fa 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/log/ResumableStartupTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/log/ResumableStartupTest.java @@ -52,7 +52,7 @@ import static org.apache.cassandra.distributed.shared.ClusterUtils.getSequenceAf public class ResumableStartupTest extends FuzzTestBase { - private static int WRITES = 2000; + private static int WRITES = 500; @Test public void bootstrapWithDeferredJoinTest() throws Throwable diff --git a/test/distributed/org/apache/cassandra/distributed/test/ring/ConsistentBootstrapTest.java b/test/distributed/org/apache/cassandra/distributed/test/ring/ConsistentBootstrapTest.java index 5600e17881..cab68089af 100644 --- a/test/distributed/org/apache/cassandra/distributed/test/ring/ConsistentBootstrapTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/ring/ConsistentBootstrapTest.java @@ -53,7 +53,7 @@ import static org.apache.cassandra.distributed.shared.ClusterUtils.waitForCMSToQ public class ConsistentBootstrapTest extends FuzzTestBase { - private static int WRITES = 2000; + private static int WRITES = 500; private static final Configuration.ConfigurationBuilder configBuilder;