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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 738d5de9 fix test_compactionstats for < 4.0
738d5de9 is described below

commit 738d5de93def153338003a26e304a77463a7fd2a
Author: Brandon Williams <brandonwilli...@apache.org>
AuthorDate: Mon Aug 21 14:37:49 2023 -0500

    fix test_compactionstats for < 4.0
    
    Patch by brandonwilliams; reviewed by edimitrova for CASSANDRA-18709
---
 jmx_test.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/jmx_test.py b/jmx_test.py
index 87e9adf3..3900d931 100644
--- a/jmx_test.py
+++ b/jmx_test.py
@@ -198,8 +198,13 @@ class TestJMX(Tester):
         # Run a major compaction. This will be the compaction whose
         # progress we track.
         node.nodetool_process('compact keyspace1')
-        # We need to sleep here to give compaction time to start
-        node.watch_log_for("Compacting")
+        if self.cluster.version() >= LooseVersion('4.0'):
+            node.watch_log_for("Compacting")
+        elif self.cluster.version() >= LooseVersion('3.11'):
+            node.watch_log_for("Major compaction")
+        else:
+            node.watch_log_for("Compacting", filename="debug.log")
+
 
         compaction_manager = make_mbean('db', type='CompactionManager')
         with JolokiaAgent(node) as jmx:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to