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 396f2368 Rework timeout handling in 
test_decommissioned_node_cant_rejoin
396f2368 is described below

commit 396f2368e6fa330b6212aeb85363d0e53b5cff78
Author: Brandon Williams <brandonwilli...@apache.org>
AuthorDate: Thu May 25 14:12:39 2023 -0500

    Rework timeout handling in test_decommissioned_node_cant_rejoin
    
    Patch by brandonwilliams; reviewed by bereng for CASSANDRA-17302
---
 topology_test.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/topology_test.py b/topology_test.py
index 1f9c6889..9feae9df 100644
--- a/topology_test.py
+++ b/topology_test.py
@@ -405,16 +405,21 @@ class TestTopology(Tester):
         node3.stop()
         logger.debug('attempting restart...')
         node3.start(wait_other_notice=False)
+        timedout = False
         try:
             # usually takes 3 seconds, so give it a generous 15
             node3.watch_log_for(rejoin_err, timeout=15)
         except TimeoutError:
             # TimeoutError is not very helpful to the reader of the test 
output;
             # let that pass and move on to string assertion below
-            pass
+            timedout = True
+
+        n3errors = node3.grep_log_for_errors()
+        if len(n3errors) == 0 and timedout:
+            raise TimeoutError("timed out and did not find log entry: " + 
rejoin_err)
 
         assert re.search(rejoin_err,
-                         '\n'.join(['\n'.join(err_list) for err_list in 
node3.grep_log_for_errors()]), re.MULTILINE)
+                         '\n'.join(['\n'.join(err_list) for err_list in 
n3errors]), re.MULTILINE)
 
         # Give the node some time to shut down once it has detected
         # its invalid state. If it doesn't shut down in the 30 seconds,


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

Reply via email to