Skip to content

Commit 4b47f4d

Browse files
committed
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
1 parent 7b6eb84 commit 4b47f4d

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

tests/integration/standard/test_cluster.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import subprocess
1515

1616
import unittest
17+
import pytest
1718

1819
from collections import deque
1920
from copy import copy
@@ -42,7 +43,9 @@
4243
from tests.integration import use_cluster, get_server_versions, CASSANDRA_VERSION, \
4344
execute_until_pass, execute_with_long_wait_retry, get_node, MockLoggingHandler, get_unsupported_lower_protocol, \
4445
get_unsupported_upper_protocol, lessthanprotocolv3, protocolv6, local, CASSANDRA_IP, greaterthanorequalcass30, \
45-
lessthanorequalcass40, DSE_VERSION, TestCluster, PROTOCOL_VERSION, xfail_scylla, incorrect_test
46+
lessthanorequalcass40, DSE_VERSION, TestCluster, PROTOCOL_VERSION, xfail_scylla, incorrect_test, SCYLLA_VERSION, \
47+
EVENT_LOOP_MANAGER
48+
4649
from tests.integration.util import assert_quiescent_pool_state
4750
import sys
4851

@@ -752,6 +755,7 @@ def _warning_are_issued_when_auth(self, auth_provider):
752755
mock_handler.get_message_count("debug", "Got ReadyMessage on new connection")
753756
)
754757

758+
@pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False)
755759
def test_idle_heartbeat(self):
756760
interval = 2
757761
cluster = TestCluster(idle_heartbeat_interval=interval,
@@ -831,6 +835,7 @@ def test_idle_heartbeat_disabled(self):
831835

832836
cluster.shutdown()
833837

838+
@pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False)
834839
def test_pool_management(self):
835840
# Ensure that in_flight and request_ids quiesce after cluster operations
836841
cluster = TestCluster(idle_heartbeat_interval=0) # no idle heartbeat here, pool management is tested in test_idle_heartbeat
@@ -1439,7 +1444,7 @@ def test_session_no_cluster(self):
14391444

14401445

14411446
class HostStateTest(unittest.TestCase):
1442-
1447+
@pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False)
14431448
def test_down_event_with_active_connection(self):
14441449
"""
14451450
Test to ensure that on down calls to clusters with connections still active don't result in

tests/integration/standard/test_connection.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import unittest
16+
import pytest
1617

1718
from functools import partial
1819
from mock import patch
@@ -38,7 +39,7 @@
3839

3940
from tests import is_monkey_patched
4041
from tests.integration import use_singledc, get_node, CASSANDRA_IP, local, \
41-
requiresmallclockgranularity, greaterthancass20, TestCluster
42+
requiresmallclockgranularity, greaterthancass20, TestCluster, EVENT_LOOP_MANAGER, SCYLLA_VERSION
4243

4344
try:
4445
from cassandra.io.libevreactor import LibevConnection
@@ -127,6 +128,7 @@ def tearDown(self):
127128

128129
@local
129130
@greaterthancass20
131+
@pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False)
130132
def test_heart_beat_timeout(self):
131133
# Setup a host listener to ensure the nodes don't go down
132134
test_listener = TestHostListener()

tests/integration/standard/test_metadata.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
greaterthanorequaldse67, lessthancass40,
4444
TestCluster, DSE_VERSION, requires_java_udf, requires_composite_type,
4545
requires_collection_indexes, SCYLLA_VERSION, xfail_scylla, xfail_scylla_version_lt,
46-
scylla_only)
46+
scylla_only, EVENT_LOOP_MANAGER)
4747

4848
from tests.util import wait_until
4949

@@ -215,6 +215,7 @@ def get_table_metadata(self):
215215
self.cluster.refresh_table_metadata(self.keyspace_name, self.function_table_name)
216216
return self.cluster.metadata.keyspaces[self.keyspace_name].tables[self.function_table_name]
217217

218+
@pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False)
218219
def test_basic_table_meta_properties(self):
219220
create_statement = self.make_create_statement(["a"], [], ["b", "c"])
220221
self.session.execute(create_statement)
@@ -573,6 +574,7 @@ def test_non_size_tiered_compaction(self):
573574
self.assertNotIn("max_threshold", cql)
574575

575576
@requires_java_udf
577+
@pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False)
576578
def test_refresh_schema_metadata(self):
577579
"""
578580
test for synchronously refreshing all cluster metadata
@@ -1062,6 +1064,7 @@ def test_metadata_pagination(self):
10621064
self.cluster.refresh_schema_metadata()
10631065
self.assertEqual(len(self.cluster.metadata.keyspaces[self.keyspace_name].tables), 12)
10641066

1067+
@pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False)
10651068
def test_metadata_pagination_keyspaces(self):
10661069
"""
10671070
test for covering

0 commit comments

Comments
 (0)