Skip to content

Commit 7765b7d

Browse files
committed
Only run test_sigstop_sigint on FaaS
1 parent 59e1897 commit 7765b7d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/asynchronous/test_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
WriteConcernError,
118118
)
119119
from pymongo.monitoring import ServerHeartbeatListener, ServerHeartbeatStartedEvent
120-
from pymongo.pool_options import _MAX_METADATA_SIZE, _METADATA, ENV_VAR_K8S, PoolOptions
120+
from pymongo.pool_options import _MAX_METADATA_SIZE, _METADATA, ENV_VAR_K8S, PoolOptions, _is_faas
121121
from pymongo.read_preferences import ReadPreference
122122
from pymongo.server_description import ServerDescription
123123
from pymongo.server_selectors import readable_server_selector, writable_server_selector
@@ -2010,6 +2010,7 @@ async def test_srv_max_hosts_kwarg(self):
20102010
"loadBalanced clients do not run SDAM",
20112011
)
20122012
@unittest.skipIf(sys.platform == "win32", "Windows does not support SIGSTOP")
2013+
@unittest.skipUnless(_is_faas(), "Non-FaaS environments raise timeouts faster")
20132014
@async_client_context.require_sync
20142015
def test_sigstop_sigcont(self):
20152016
test_dir = os.path.dirname(os.path.realpath(__file__))

test/test_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
WriteConcernError,
107107
)
108108
from pymongo.monitoring import ServerHeartbeatListener, ServerHeartbeatStartedEvent
109-
from pymongo.pool_options import _MAX_METADATA_SIZE, _METADATA, ENV_VAR_K8S, PoolOptions
109+
from pymongo.pool_options import _MAX_METADATA_SIZE, _METADATA, ENV_VAR_K8S, PoolOptions, _is_faas
110110
from pymongo.read_preferences import ReadPreference
111111
from pymongo.server_description import ServerDescription
112112
from pymongo.server_selectors import readable_server_selector, writable_server_selector
@@ -1967,6 +1967,7 @@ def test_srv_max_hosts_kwarg(self):
19671967
"loadBalanced clients do not run SDAM",
19681968
)
19691969
@unittest.skipIf(sys.platform == "win32", "Windows does not support SIGSTOP")
1970+
@unittest.skipUnless(_is_faas(), "Non-FaaS environments raise timeouts faster")
19701971
@client_context.require_sync
19711972
def test_sigstop_sigcont(self):
19721973
test_dir = os.path.dirname(os.path.realpath(__file__))

0 commit comments

Comments
 (0)