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 7bc84672 Fix flaky python-tests due to connection getting closed Patch 
by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-17594
7bc84672 is described below

commit 7bc8467233af69391efeaf74ef87a73c0ea9ceb1
Author: David Capwell <dcapw...@gmail.com>
AuthorDate: Wed Jun 1 10:57:09 2022 -0700

    Fix flaky python-tests due to connection getting closed
    Patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-17594
---
 dtest_setup.py                         |  9 ++++++++-
 hintedhandoff_test.py                  |  3 +++
 materialized_views_test.py             |  2 ++
 repair_tests/deprecated_repair_test.py | 14 ++++++++++++++
 4 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/dtest_setup.py b/dtest_setup.py
index 6a396b8e..50509e66 100644
--- a/dtest_setup.py
+++ b/dtest_setup.py
@@ -47,7 +47,14 @@ def retry_till_success(fun, *args, **kwargs):
 def default_ignore_log_patterns():
     # to allow tests to append to the list, make sure to create a new list as 
the output
     # to this function, else multiple tests could corrupt the default set
-    return ['.*\[epollEventLoopGroup-.*\].*- Unknown exception in client 
networking.*: Connection reset by peer']
+    return ['failed: Connection reset by peer',
+            r'Invalid or unsupported protocol version \(5\)',
+            # See python-driver, SHA a7295e103023e12152fc0940906071b18356def3
+            # cassandra/__init__.py
+            r'Invalid or unsupported protocol version \(65\)',  # DSE_V1
+            r'Invalid or unsupported protocol version \(66\)',  # DSE_V2
+            'Beta version of the protocol used',
+            ]
 
 
 class DTestSetup(object):
diff --git a/hintedhandoff_test.py b/hintedhandoff_test.py
index 65be1830..5f127661 100644
--- a/hintedhandoff_test.py
+++ b/hintedhandoff_test.py
@@ -182,6 +182,9 @@ class TestHintedHandoff(Tester):
     @ported_to_in_jvm('4.0')
     @pytest.mark.no_vnodes
     def test_hintedhandoff_decom(self):
+        self.fixture_dtest_setup.ignore_log_patterns = [
+            'Could not update repaired ranges.*Giving up'
+        ]
         self.cluster.populate(4).start()
         [node1, node2, node3, node4] = self.cluster.nodelist()
         session = self.patient_cql_connection(node1)
diff --git a/materialized_views_test.py b/materialized_views_test.py
index 438dbd70..6f547881 100644
--- a/materialized_views_test.py
+++ b/materialized_views_test.py
@@ -342,6 +342,7 @@ class TestMaterializedViews(Tester):
         session = self.prepare(consistency_level=ConsistencyLevel.QUORUM)
 
         session.execute("CREATE TABLE t (id int, v int, PRIMARY KEY (id, v))")
+        session.cluster.control_connection.wait_for_schema_agreement()
 
         for i in range(5):
             for j in range(10000):
@@ -349,6 +350,7 @@ class TestMaterializedViews(Tester):
 
         session.execute(("CREATE MATERIALIZED VIEW t_by_v AS SELECT * FROM t 
WHERE v IS NOT NULL "
                          "AND id IS NOT NULL PRIMARY KEY (v, id)"))
+        session.cluster.control_connection.wait_for_schema_agreement()
 
         logger.debug("wait for view to build")
         self._wait_for_view("ks", "t_by_v")
diff --git a/repair_tests/deprecated_repair_test.py 
b/repair_tests/deprecated_repair_test.py
index 958fee4d..75c770e4 100644
--- a/repair_tests/deprecated_repair_test.py
+++ b/repair_tests/deprecated_repair_test.py
@@ -85,6 +85,13 @@ class TestDeprecatedRepairAPI(Tester):
                                    Collection<String> hosts, boolean 
fullRepair,
                                    String... columnFamilies)
         """
+        # when giving token ranges, there needs to be logic to make sure we 
have partitions for
+        # those tokens... which self._deprecated_repair_jmx does not do... for 
this reason most
+        # runs will not actually trigger repair and will abort (we check 
logging, which will happen
+        # still).
+        self.fixture_dtest_setup.ignore_log_patterns = [
+            'Nothing to repair for'
+        ]
         opt = 
self._deprecated_repair_jmx("forceRepairRangeAsync(java.lang.String,java.lang.String,java.lang.String,boolean,java.util.Collection,java.util.Collection,boolean,[Ljava.lang.String;)",
                                           ["0", "1000", "ks", True, ["dc1"], 
[], False, ["cf"]])
         assert opt["parallelism"], "parallel" if is_win() else "sequential" == 
opt
@@ -122,6 +129,13 @@ class TestDeprecatedRepairAPI(Tester):
                                    boolean isLocal, boolean fullRepair,
                                    String... columnFamilies)
         """
+        # when giving token ranges, there needs to be logic to make sure we 
have partitions for
+        # those tokens... which self._deprecated_repair_jmx does not do... for 
this reason most
+        # runs will not actually trigger repair and will abort (we check 
logging, which will happen
+        # still).
+        self.fixture_dtest_setup.ignore_log_patterns = [
+            'Nothing to repair for'
+        ]
         opt = 
self._deprecated_repair_jmx("forceRepairRangeAsync(java.lang.String,java.lang.String,java.lang.String,boolean,boolean,boolean,[Ljava.lang.String;)",
                                           ["0", "1000", "ks", True, True, 
True, ["cf"]])
         assert opt["parallelism"], "parallel" if is_win() else "sequential" == 
opt


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

Reply via email to