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 2024/07/24 12:36:07 UTC

(cassandra-dtest) 22/43: STAR-822: Update test_consistent_repair dtest

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

jlewandowski pushed a commit to branch ds-trunk-5.0--2024-07-24
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git

commit 084c47e6593e9e57081f323ceeff8a2e4ac2afd0
Author: Jacek Lewandowski <le...@gmail.com>
AuthorDate: Mon Aug 16 11:31:18 2021 +0200

    STAR-822: Update test_consistent_repair dtest
    
    In DB-4215 compaction has been separated from repairs and that separation seems to be pulled from DSE along with UCS. Therefore, checking for the repair status depending on whether compaction was run or not is nor relevant any longer.
    
    This commit updates the test_consistent_repair to the version we have in apollo-dtest.
    
    (cherry picked from commit b454087c306ee5121fc338da679c842973229099)
    (cherry picked from commit 0465be493e460b92e894a6ec34b9b5b8df701e33)
    (cherry picked from commit 3348bc719b187fb80df2954020d5d92da78a62af)
    (cherry picked from commit c71c48053d3be4724aabd4d715e23a430f4ab78a)
    (cherry picked from commit 3cc377cdd4d05d466faa3dfd8ab2092f3d08fabe)
---
 repair_tests/incremental_repair_test.py | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/repair_tests/incremental_repair_test.py b/repair_tests/incremental_repair_test.py
index d18b390d..26f11ded 100644
--- a/repair_tests/incremental_repair_test.py
+++ b/repair_tests/incremental_repair_test.py
@@ -145,38 +145,20 @@ class TestIncRepair(Tester):
             results = list(session.execute("SELECT * FROM system.repairs"))
             assert len(results) == 0, str(results)
 
-        # disable compaction so we can verify sstables are marked pending repair
-        for node in self.cluster.nodelist():
-            node.nodetool('disableautocompaction ks tbl')
-
+        # repair
         node1.repair(options=['ks'])
 
         # check that all participating nodes have the repair recorded in their system
         # table, that all nodes are listed as participants, and that all sstables are
         # (still) marked pending repair
         expected_participants = {n.address() for n in self.cluster.nodelist()}
-        expected_participants_wp = {n.address_and_port() for n in self.cluster.nodelist()}
-        recorded_pending_ids = set()
         for node in self.cluster.nodelist():
             session = self.patient_exclusive_cql_connection(node)
             results = list(session.execute("SELECT * FROM system.repairs"))
             assert len(results) == 1
             result = results[0]
             assert set(result.participants) == expected_participants
-            if hasattr(result, "participants_wp"):
-                assert set(result.participants_wp) == expected_participants_wp
-            assert result.state, ConsistentState.FINALIZED == "4=FINALIZED"
-            pending_id = result.parent_id
-            self.assertAllPendingRepairSSTables(node, 'ks', pending_id)
-            recorded_pending_ids.add(pending_id)
-
-        assert len(recorded_pending_ids) == 1
-
-        # sstables are compacted out of pending repair by a compaction
-        # task, we disabled compaction earlier in the test, so here we
-        # force the compaction and check that all sstables are promoted
-        for node in self.cluster.nodelist():
-            node.nodetool('compact ks tbl')
+            assert result.state == ConsistentState.FINALIZED, str(result.state)
             self.assertAllRepairedSSTables(node, 'ks')
 
     def test_sstable_marking(self):


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