This is an automated email from the ASF dual-hosted git repository. jonmeredith pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit ccf37892199d76c1bebcaa98e0e1b15400bd8a91 Merge: 73da05f83b 602ffcbf3e Author: Jon Meredith <[email protected]> AuthorDate: Wed May 3 14:42:57 2023 -0600 Merge branch 'cassandra-4.1' into trunk .../distributed/test/PaxosRepair2Test.java | 246 ++++++++++----------- 1 file changed, 122 insertions(+), 124 deletions(-) diff --cc test/distributed/org/apache/cassandra/distributed/test/PaxosRepair2Test.java index a66bf1bd32,574b84f2eb..804353028b --- a/test/distributed/org/apache/cassandra/distributed/test/PaxosRepair2Test.java +++ b/test/distributed/org/apache/cassandra/distributed/test/PaxosRepair2Test.java @@@ -66,10 -63,8 +63,9 @@@ import org.apache.cassandra.distributed import org.apache.cassandra.distributed.api.ConsistencyLevel; import org.apache.cassandra.distributed.api.Feature; import org.apache.cassandra.distributed.api.IInvokableInstance; +import org.apache.cassandra.distributed.shared.ClusterUtils; import org.apache.cassandra.exceptions.CasWriteTimeoutException; import org.apache.cassandra.gms.FailureDetector; - import org.apache.cassandra.gms.Gossiper; import org.apache.cassandra.locator.InetAddressAndPort; import org.apache.cassandra.net.Verb; import org.apache.cassandra.repair.RepairParallelism; @@@ -256,14 -239,12 +240,12 @@@ public class PaxosRepair2Test extends T ) { cluster.schemaChange("CREATE TABLE " + KEYSPACE + '.' + TABLE + " (k int primary key, v int)"); - cluster.get(3).shutdown().get(); + ClusterUtils.stopUnchecked(cluster.get(3)); InetAddressAndPort node3 = InetAddressAndPort.getByAddress(cluster.get(3).broadcastAddress()); - for (int i = 0; i < 10; i++) - { - if (!cluster.get(1).callOnInstance(() -> FailureDetector.instance.isAlive(node3))) - break; - } + // make sure node1 knows node3 is down + Awaitility.waitAtMost(1,TimeUnit.MINUTES).until( + () -> !cluster.get(1).callOnInstance(() -> FailureDetector.instance.isAlive(node3))); repair(cluster, KEYSPACE, TABLE, true); for (int i = 0; i < cluster.size() - 1; i++) @@@ -356,8 -338,13 +339,13 @@@ .set("truncate_request_timeout_in_ms", 1000L))) ) { + cluster.forEach(i -> { + Assert.assertFalse(CassandraRelevantProperties.CLOCK_GLOBAL.isPresent()); + Assert.assertEquals("1", System.getProperty("cassandra.auto_repair_frequency_seconds")); + Assert.assertEquals("true", System.getProperty("cassandra.disable_paxos_auto_repairs")); + }); cluster.schemaChange("CREATE TABLE " + KEYSPACE + '.' + TABLE + " (pk int, ck int, v int, PRIMARY KEY (pk, ck))"); - cluster.get(3).shutdown().get(); + ClusterUtils.stopUnchecked(cluster.get(3)); cluster.verbs(Verb.PAXOS_COMMIT_REQ).drop(); try { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
