This is an automated email from the ASF dual-hosted git repository.

samt pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git

commit e4c27f9e1b9265dd3993b24ca7eb38cb546bc19f
Author: Marcus Eriksson <[email protected]>
AuthorDate: Wed May 31 12:16:36 2023 +0200

    [CEP-21] Fix async startup handling in test_sstable_marking
---
 repair_tests/incremental_repair_test.py | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/repair_tests/incremental_repair_test.py 
b/repair_tests/incremental_repair_test.py
index c2bf3c71..ff8d66be 100644
--- a/repair_tests/incremental_repair_test.py
+++ b/repair_tests/incremental_repair_test.py
@@ -1,4 +1,6 @@
 import time
+from distutils.version import LooseVersion
+
 import pytest
 import re
 import logging
@@ -198,12 +200,21 @@ class TestIncRepair(Tester):
         node1.flush()
         node2.flush()
 
-        node3.start()
+        node3.start(wait_other_notice=True)
+        mark = node3.mark_log()
         if node3.get_cassandra_version() < '2.2':
             log_file = 'system.log'
         else:
             log_file = 'debug.log'
-        node3.watch_log_for("Initializing keyspace1.standard1", 
filename=log_file)
+
+        # in later versions, schema init happens asynchronously via the 
metadata log
+        # follower so may occur before the server is ready to accept JMX 
connections
+        if node3.get_cassandra_version() >= LooseVersion('5.1'):
+            ready_message = "Startup complete"
+        else:
+            ready_message = "Initializing keyspace1.standard1"
+
+        node3.watch_log_for(ready_message, filename=log_file, from_mark=mark)
         # wait for things to settle before starting repair
         time.sleep(1)
         if self.cluster.version() >= "2.2":


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

Reply via email to