You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jl...@apache.org on 2023/03/08 16:36:58 UTC

[cassandra-dtest] branch trunk updated: Repair the previous fix in offline_tools_test.py to work for < 4.2

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

jlewandowski 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 ddc7ca34 Repair the previous fix in offline_tools_test.py to work for < 4.2
ddc7ca34 is described below

commit ddc7ca342f8a84565a01d769c4ec71502a2278d6
Author: Jacek Lewandowski <le...@gmail.com>
AuthorDate: Wed Mar 8 14:49:56 2023 +0100

    Repair the previous fix in offline_tools_test.py to work for < 4.2
    
    patch by Jacek Lewandowski, reviewed by Brandon Williams and Ekaterina Dimitrova for CASSANDRA-18308
---
 offline_tools_test.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/offline_tools_test.py b/offline_tools_test.py
index 9b1cfabc..51e28aab 100644
--- a/offline_tools_test.py
+++ b/offline_tools_test.py
@@ -311,7 +311,11 @@ class TestOfflineTools(Tester):
             (out, error, rc) = node1.run_sstableverify("keyspace1", "standard1", options=options)
             assert False, "sstable verify did not fail; rc={}\nout={}\nerr={}".format(str(rc), out, error)
         except ToolError as e:
-            m = re.match("(?ms).*Corrupted file: integrity check .* failed for (?P<sstable>\S+?):.*", str(e))
+            m = None
+            if cluster.version() >= '4.2':
+                m = re.match("(?ms).*Corrupted file: integrity check .* failed for (?P<sstable>\S+?):.*", str(e))
+            else:
+                m = re.match("(?ms).*Corrupted SSTable : (?P<sstable>\S+)", str(e))
             assert m is not None, str(e)
             # MacOS might use the "private" prefix.
             assert os.path.normcase(m.group('sstable')).replace("/private/var/folders", "/var/folders") == sstable1


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