Skip to content

Commit 48399d6

Browse files
committed
tests: skip test_execute_query_timeout if running with asyncio
asyncio can't do timeouts smaller than 1ms, as this test requires it's a limitation of `asyncio.sleep` Fixes: #263
1 parent 85a7211 commit 48399d6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,4 @@ def is_windows():
9999

100100
notwindows = unittest.skipUnless(not is_windows(), "This test is not adequate for windows")
101101
notpypy = unittest.skipUnless(not platform.python_implementation() == 'PyPy', "This tests is not suitable for pypy")
102+
notasyncio = unittest.skipUnless(not EVENT_LOOP_MANAGER == 'asyncio', "This tests is not suitable for EVENT_LOOP_MANAGER=asyncio")

tests/integration/standard/test_cluster.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
from cassandra import connection
3939
from cassandra.connection import DefaultEndPoint
4040

41-
from tests import notwindows
41+
from tests import notwindows, notasyncio
4242
from tests.integration import use_cluster, get_server_versions, CASSANDRA_VERSION, \
4343
execute_until_pass, execute_with_long_wait_retry, get_node, MockLoggingHandler, get_unsupported_lower_protocol, \
4444
get_unsupported_upper_protocol, lessthanprotocolv3, protocolv6, local, CASSANDRA_IP, greaterthanorequalcass30, \
@@ -1138,6 +1138,7 @@ def test_stale_connections_after_shutdown(self):
11381138
assert False, f'Found stale connections: {result.stdout}'
11391139

11401140
@notwindows
1141+
@notasyncio # asyncio can't do timeouts smaller than 1ms, as this test requires
11411142
def test_execute_query_timeout(self):
11421143
with TestCluster() as cluster:
11431144
session = cluster.connect(wait_for_all_pools=True)

0 commit comments

Comments
 (0)