Skip to content

Commit 64f3fe9

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 725e62a commit 64f3fe9

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
@@ -105,3 +105,4 @@ def is_windows():
105105

106106
notwindows = unittest.skipUnless(not is_windows(), "This test is not adequate for windows")
107107
notpypy = unittest.skipUnless(not platform.python_implementation() == 'PyPy', "This tests is not suitable for pypy")
108+
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
@@ -39,7 +39,7 @@
3939
from cassandra import connection
4040
from cassandra.connection import DefaultEndPoint
4141

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

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

0 commit comments

Comments
 (0)