From 48666adf53017a87bf7dc3bb75411ee41f72b500 Mon Sep 17 00:00:00 2001 From: Israel Fruchter Date: Sun, 24 Nov 2024 15:57:51 +0200 Subject: [PATCH] tests/integration: xfail few unstable tests with cassandra+asyncio couldn't identified the root cause of the failures in those tests and they seem to be failing just on asyncio (which is still exprimatal for cassandra), so they are marked as xfail for now --- tests/integration/standard/test_cluster.py | 9 +++++++-- tests/integration/standard/test_connection.py | 4 +++- tests/integration/standard/test_metadata.py | 5 ++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/integration/standard/test_cluster.py b/tests/integration/standard/test_cluster.py index e506596bf7..02c6e6c8d5 100644 --- a/tests/integration/standard/test_cluster.py +++ b/tests/integration/standard/test_cluster.py @@ -14,6 +14,7 @@ import subprocess import unittest +import pytest from collections import deque from copy import copy @@ -42,7 +43,9 @@ from tests.integration import use_cluster, get_server_versions, CASSANDRA_VERSION, \ execute_until_pass, execute_with_long_wait_retry, get_node, MockLoggingHandler, get_unsupported_lower_protocol, \ get_unsupported_upper_protocol, lessthanprotocolv3, protocolv6, local, CASSANDRA_IP, greaterthanorequalcass30, \ - lessthanorequalcass40, DSE_VERSION, TestCluster, PROTOCOL_VERSION, xfail_scylla, incorrect_test + lessthanorequalcass40, DSE_VERSION, TestCluster, PROTOCOL_VERSION, xfail_scylla, incorrect_test, SCYLLA_VERSION, \ + EVENT_LOOP_MANAGER + from tests.integration.util import assert_quiescent_pool_state import sys @@ -753,6 +756,7 @@ def _warning_are_issued_when_auth(self, auth_provider): mock_handler.get_message_count("debug", "Got ReadyMessage on new connection") ) + @pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False) def test_idle_heartbeat(self): interval = 2 cluster = TestCluster(idle_heartbeat_interval=interval, @@ -832,6 +836,7 @@ def test_idle_heartbeat_disabled(self): cluster.shutdown() + @pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False) def test_pool_management(self): # Ensure that in_flight and request_ids quiesce after cluster operations cluster = TestCluster(idle_heartbeat_interval=0) # no idle heartbeat here, pool management is tested in test_idle_heartbeat @@ -1440,7 +1445,7 @@ def test_session_no_cluster(self): class HostStateTest(unittest.TestCase): - + @pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False) def test_down_event_with_active_connection(self): """ Test to ensure that on down calls to clusters with connections still active don't result in diff --git a/tests/integration/standard/test_connection.py b/tests/integration/standard/test_connection.py index a1b05c3d6f..4d81659711 100644 --- a/tests/integration/standard/test_connection.py +++ b/tests/integration/standard/test_connection.py @@ -13,6 +13,7 @@ # limitations under the License. import unittest +import pytest from functools import partial from mock import patch @@ -38,7 +39,7 @@ from tests import is_monkey_patched from tests.integration import use_singledc, get_node, CASSANDRA_IP, local, \ - requiresmallclockgranularity, greaterthancass20, TestCluster + requiresmallclockgranularity, greaterthancass20, TestCluster, EVENT_LOOP_MANAGER, SCYLLA_VERSION try: from cassandra.io.libevreactor import LibevConnection @@ -125,6 +126,7 @@ def tearDown(self): @local @greaterthancass20 + @pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False) def test_heart_beat_timeout(self): # Setup a host listener to ensure the nodes don't go down test_listener = TestHostListener() diff --git a/tests/integration/standard/test_metadata.py b/tests/integration/standard/test_metadata.py index 0801db9561..f424e6db29 100644 --- a/tests/integration/standard/test_metadata.py +++ b/tests/integration/standard/test_metadata.py @@ -42,7 +42,7 @@ greaterthancass21, assert_startswith, greaterthanorequalcass40, greaterthanorequaldse67, lessthancass40, TestCluster, DSE_VERSION, requires_java_udf, requires_composite_type, - requires_collection_indexes, SCYLLA_VERSION, xfail_scylla, scylla_only) + requires_collection_indexes, SCYLLA_VERSION, xfail_scylla, scylla_only, EVENT_LOOP_MANAGER) from tests.util import wait_until @@ -214,6 +214,7 @@ def get_table_metadata(self): self.cluster.refresh_table_metadata(self.keyspace_name, self.function_table_name) return self.cluster.metadata.keyspaces[self.keyspace_name].tables[self.function_table_name] + @pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False) def test_basic_table_meta_properties(self): create_statement = self.make_create_statement(["a"], [], ["b", "c"]) self.session.execute(create_statement) @@ -571,6 +572,7 @@ def test_non_size_tiered_compaction(self): self.assertNotIn("max_threshold", cql) @requires_java_udf + @pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False) def test_refresh_schema_metadata(self): """ test for synchronously refreshing all cluster metadata @@ -1060,6 +1062,7 @@ def test_metadata_pagination(self): self.cluster.refresh_schema_metadata() self.assertEqual(len(self.cluster.metadata.keyspaces[self.keyspace_name].tables), 12) + @pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False) def test_metadata_pagination_keyspaces(self): """ test for covering