jacek-lewandowski commented on code in PR #1804:
URL: https://github.com/apache/cassandra/pull/1804#discussion_r960533987


##########
test/distributed/org/apache/cassandra/distributed/test/SchemaTest.java:
##########
@@ -95,25 +107,54 @@ private void selectSilent(Cluster cluster, String name)
     @Test
     public void schemaReset() throws Throwable
     {
+        CassandraRelevantProperties.MIGRATION_DELAY.setLong(10000);
+        CassandraRelevantProperties.SCHEMA_PULL_INTERVAL.setLong(10000);
         try (Cluster cluster = init(Cluster.build(2).withConfig(cfg -> 
cfg.with(Feature.GOSSIP, Feature.NETWORK)).start()))
         {
             cluster.schemaChange("CREATE TABLE " + KEYSPACE + ".tbl (pk INT 
PRIMARY KEY, v TEXT)");
 
             assertTrue(cluster.get(1).callOnInstance(() -> 
Schema.instance.getTableMetadata(KEYSPACE, "tbl") != null));
             assertTrue(cluster.get(2).callOnInstance(() -> 
Schema.instance.getTableMetadata(KEYSPACE, "tbl") != null));
 
+            // now we have a table tbl in the schema of both nodes
+
             cluster.get(2).shutdown().get();
 
-            // when schema is removed and there is no other node to fetch it 
from, node 1 should be left with clean schema
-            cluster.get(1).runOnInstance(() -> 
Schema.instance.resetLocalSchema());
+            Awaitility.await().atMost(Duration.ofSeconds(30)) // wait until 
node 1 notices that node 2 is dead
+                      .until(() -> cluster.get(1).callOnInstance(() -> 
Gossiper.instance.getLiveMembers().stream().allMatch(e -> 
e.equals(FBUtilities.getBroadcastAddressAndPort()))));

Review Comment:
   I will, but with the current formatting rules I can see no way to format it 
nicely



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to