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 c40984f5ebfd1c621f62a02edb2d609a45a56f69
Author: Marcus Eriksson <[email protected]>
AuthorDate: Mon May 8 16:00:24 2023 +0200

    [CEP-21] need to add --force to allow removenode to result in fewer 
replicas than RF
---
 topology_test.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/topology_test.py b/topology_test.py
index 4f1ffbee..3421c363 100644
--- a/topology_test.py
+++ b/topology_test.py
@@ -1,5 +1,7 @@
 import re
 import time
+from distutils.version import LooseVersion
+
 import pytest
 import logging
 
@@ -138,7 +140,10 @@ class TestTopology(Tester):
 
         node3_id = node3.nodetool('info').stdout[25:61]
         node3.stop(wait_other_notice=True)
-        node1.nodetool('removenode ' + node3_id)
+        cmd = 'removenode ' + node3_id
+        if cluster.version() >= LooseVersion('5.1'):
+            cmd = cmd + ' --force'
+        node1.nodetool(cmd)
 
         node1.stress(['read', 'n=10K', 'no-warmup', '-rate', 'threads=8'])
 


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

Reply via email to