Skip to content

Commit 48666ad

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 ccb5e03 commit 48666ad

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

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

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

833837
cluster.shutdown()
834838

839+
@pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False)
835840
def test_pool_management(self):
836841
# Ensure that in_flight and request_ids quiesce after cluster operations
837842
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):
14401445

14411446

14421447
class HostStateTest(unittest.TestCase):
1443-
1448+
@pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False)
14441449
def test_down_event_with_active_connection(self):
14451450
"""
14461451
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
@@ -125,6 +126,7 @@ def tearDown(self):
125126

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

tests/integration/standard/test_metadata.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
greaterthancass21, assert_startswith, greaterthanorequalcass40,
4343
greaterthanorequaldse67, lessthancass40,
4444
TestCluster, DSE_VERSION, requires_java_udf, requires_composite_type,
45-
requires_collection_indexes, SCYLLA_VERSION, xfail_scylla, scylla_only)
45+
requires_collection_indexes, SCYLLA_VERSION, xfail_scylla, scylla_only, EVENT_LOOP_MANAGER)
4646

4747
from tests.util import wait_until
4848

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

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

573574
@requires_java_udf
575+
@pytest.mark.xfail(reason="test not stable on cassandra", condition=EVENT_LOOP_MANAGER=="asyncio" and SCYLLA_VERSION is None, strict=False)
574576
def test_refresh_schema_metadata(self):
575577
"""
576578
test for synchronously refreshing all cluster metadata
@@ -1060,6 +1062,7 @@ def test_metadata_pagination(self):
10601062
self.cluster.refresh_schema_metadata()
10611063
self.assertEqual(len(self.cluster.metadata.keyspaces[self.keyspace_name].tables), 12)
10621064

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

0 commit comments

Comments
 (0)