Skip to content

Commit 92cc8d0

Browse files
committed
test: skip a samp tests on macos
These particular test seems to hang forever on the MacOS CI runner, likely due to some race condition or other.
1 parent 6a72f2e commit 92cc8d0

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

pyvo/samp/tests/test_client.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22

3+
import sys
34
import pytest
45

56
# By default, tests should not use the internet.
@@ -9,23 +10,28 @@
910
from pyvo.samp.hub_proxy import SAMPHubProxy
1011
from pyvo.samp.integrated_client import SAMPIntegratedClient
1112

13+
IS_MACOS = sys.platform == "darwin"
14+
1215

1316
def setup_module(module):
1417
conf.use_internet = False
1518

1619

20+
@pytest.mark.skipif(IS_MACOS, reason="This test hangs on MacOS.")
1721
def test_SAMPHubProxy():
1822
"""Test that SAMPHubProxy can be instantiated"""
1923
SAMPHubProxy()
2024

2125

26+
@pytest.mark.skipif(IS_MACOS, reason="This test hangs on MacOS.")
2227
@pytest.mark.slow
2328
def test_SAMPClient():
2429
"""Test that SAMPClient can be instantiated"""
2530
proxy = SAMPHubProxy()
2631
SAMPClient(proxy)
2732

2833

34+
@pytest.mark.skipif(IS_MACOS, reason="This test hangs on MacOS.")
2935
def test_SAMPIntegratedClient():
3036
"""Test that SAMPIntegratedClient can be instantiated"""
3137
SAMPIntegratedClient()
@@ -40,6 +46,7 @@ def samp_hub():
4046
my_hub.stop()
4147

4248

49+
@pytest.mark.skipif(IS_MACOS, reason="This test hangs on MacOS.")
4350
@pytest.mark.filterwarnings("ignore:unclosed <socket:ResourceWarning")
4451
def test_SAMPIntegratedClient_notify_all(samp_hub):
4552
"""Test that SAMP returns a warning if no receiver got the message."""
@@ -51,6 +58,7 @@ def test_SAMPIntegratedClient_notify_all(samp_hub):
5158
client.disconnect()
5259

5360

61+
@pytest.mark.skipif(IS_MACOS, reason="This test hangs on MacOS.")
5462
def test_reconnect(samp_hub):
5563
"""Test that SAMPIntegratedClient can reconnect.
5664
This is a regression test for bug [#2673]

pyvo/samp/tests/test_hub.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22

33
import time
4+
import sys
45

56
import pytest
67

78
from pyvo.samp import conf
89
from pyvo.samp.hub import SAMPHubServer
910

11+
IS_MACOS = sys.platform == "darwin"
12+
1013

1114
def setup_module(module):
1215
conf.use_internet = False
1316

1417

18+
@pytest.mark.skipif(IS_MACOS, reason="This test hangs on MacOS.")
1519
def test_SAMPHubServer():
1620
"""Test that SAMPHub can be instantiated"""
1721
SAMPHubServer(web_profile=False, mode="multiple", pool_size=1)
1822

1923

24+
@pytest.mark.skipif(IS_MACOS, reason="This test hangs on MacOS.")
2025
@pytest.mark.slow
2126
def test_SAMPHubServer_run():
2227
"""Test that SAMPHub can be run"""
@@ -26,6 +31,7 @@ def test_SAMPHubServer_run():
2631
hub.stop()
2732

2833

34+
@pytest.mark.skipif(IS_MACOS, reason="This test hangs on MacOS.")
2935
@pytest.mark.slow
3036
def test_SAMPHubServer_run_repeated():
3137
"""

pyvo/samp/tests/test_hub_proxy.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1+
import sys
2+
import pytest
3+
14
from pyvo.samp import conf
25
from pyvo.samp.hub import SAMPHubServer
36
from pyvo.samp.hub_proxy import SAMPHubProxy
47

8+
IS_MACOS = sys.platform == "darwin"
9+
510

611
def setup_module(module):
712
conf.use_internet = False
813

914

15+
@pytest.mark.skipif(IS_MACOS, reason="This test hangs on MacOS.")
1016
class TestHubProxy:
1117
def setup_method(self, method):
1218
self.hub = SAMPHubServer(web_profile=False, mode="multiple", pool_size=1)

pyvo/samp/tests/test_standard_profile.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import sys
23
import pytest
34

45
# By default, tests should not use the internet.
@@ -11,12 +12,14 @@
1112
from .test_helpers import TEST_REPLY, Receiver, assert_output, random_params
1213

1314
CI = os.environ.get("CI", "false") == "true"
15+
IS_MACOS = sys.platform == "darwin"
1416

1517

1618
def setup_module(module):
1719
conf.use_internet = False
1820

1921

22+
@pytest.mark.skipif(IS_MACOS, reason="This test hangs on MacOS.")
2023
@pytest.mark.skipif(CI, reason="flaky in CI")
2124
class TestStandardProfile:
2225
@property

0 commit comments

Comments
 (0)