From b8b7cd554b6ecab18b99b496e08f5a62d1ad3041 Mon Sep 17 00:00:00 2001 From: Maxim Muzafarov Date: Sun, 22 Mar 2026 00:30:50 +0100 Subject: [PATCH] Fix ToolError regex match in test_netstats for updated ccmlib error format CASSANDRA-19476 --- jmx_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jmx_test.py b/jmx_test.py index 4c2959eeab..cc3993bb8d 100644 --- a/jmx_test.py +++ b/jmx_test.py @@ -42,7 +42,7 @@ def test_netstats(self): node1.flush() node1.stop(gently=False) - with pytest.raises(ToolError, match=r"ConnectException: 'Connection refused( \(Connection refused\))?'."): + with pytest.raises(ToolError, match=r"ConnectException: Connection refused"): node1.nodetool('netstats') # don't wait; we're testing for when nodetool is called on a node mid-startup @@ -65,7 +65,7 @@ def test_netstats(self): if cluster.version() >= LooseVersion('5.1'): assert re.search("Server is not initialized yet, cannot run nodetool", repr(e)), str(e) else: - assert re.search("ConnectException: 'Connection refused( \(Connection refused\))?'.", repr(e)), str(e) + assert re.search(r"ConnectException: Connection refused", repr(e)), str(e) assert running, 'node1 never started'