Skip to content

Commit

Permalink
tests/integration: xfail few unstable tests with cassandra+asyncio
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fruch committed Nov 25, 2024
1 parent ccb5e03 commit 48666ad
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions tests/integration/standard/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import subprocess

import unittest
import pytest

from collections import deque
from copy import copy
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion tests/integration/standard/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import unittest
import pytest

from functools import partial
from mock import patch
Expand All @@ -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
Expand Down Expand Up @@ -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()
Expand Down
5 changes: 4 additions & 1 deletion tests/integration/standard/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 48666ad

Please sign in to comment.