You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by dc...@apache.org on 2021/05/21 23:58:21 UTC

[cassandra-dtest] branch trunk updated: StandaloneVerifier does not fail when unable to verify SSTables, it only fails if Corruption is thrown

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

dcapwell 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 dfeb14d  StandaloneVerifier does not fail when unable to verify SSTables, it only fails if Corruption is thrown
dfeb14d is described below

commit dfeb14d53ecda8868293af0234c3955df07fd1cc
Author: David Capwell <David Capwell>
AuthorDate: Fri May 21 15:50:06 2021 -0700

    StandaloneVerifier does not fail when unable to verify SSTables, it only fails if Corruption is thrown
    
    patch by David Capwell; reviewed by Marcus Eriksson for CASSANDRA-16683
---
 offline_tools_test.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/offline_tools_test.py b/offline_tools_test.py
index 8f6f98d..ecae6dd 100644
--- a/offline_tools_test.py
+++ b/offline_tools_test.py
@@ -290,11 +290,12 @@ class TestOfflineTools(Tester):
         # use verbose to get some coverage on it
         try:
             (out, error, rc) = node1.run_sstableverify("keyspace1", "standard1", options=['-v'])
+            assert False, "sstable verify did not fail; rc={}\nout={}\nerr={}".format(str(rc), out, error)
         except ToolError as e:
             # Process sstableverify output to normalize paths in string to Python casing as above
-            error = re.sub("(?<=Corrupted: ).*", lambda match: os.path.normcase(match.group(0)), str(e))
+            error = re.sub("(?<=WARNING: Corrupted SSTable : ).*", lambda match: os.path.normcase(match.group(0)), str(e))
 
-            assert re.search("Corrupted: " + sstable1, error)
+            assert re.search("WARNING: Corrupted SSTable : " + sstable1, error)
             assert e.exit_status == 1, str(e.exit_status)
 
     def test_sstableexpiredblockers(self):

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