diff --git a/distributed/tests/test_stress.py b/distributed/tests/test_stress.py index 324412a6ee..84132f042f 100644 --- a/distributed/tests/test_stress.py +++ b/distributed/tests/test_stress.py @@ -167,13 +167,14 @@ def vsum(*args): return sum(args) +@pytest.mark.skip(reason="times out") @pytest.mark.avoid_ci @pytest.mark.slow @gen_cluster(client=True, nthreads=[("127.0.0.1", 1)] * 80) async def test_stress_communication(c, s, *workers): s.validate = False # very slow otherwise for w in workers: - w.validate = False + w.state.validate = False da = pytest.importorskip("dask.array") # Test consumes many file descriptors and can hang if the limit is too low resource = pytest.importorskip("resource") diff --git a/distributed/tests/test_system.py b/distributed/tests/test_system.py index d297c70be8..0da99daa50 100644 --- a/distributed/tests/test_system.py +++ b/distributed/tests/test_system.py @@ -7,6 +7,7 @@ import psutil import pytest +from distributed.compatibility import MACOS from distributed.system import memory_limit @@ -87,13 +88,15 @@ def myopen(path, *args, **kwargs): assert limit == 10 +@pytest.mark.xfail( + MACOS, + reason="Mac OS raises 'ValueError: current limit exceeds maximum limit' " + "when calling setrlimit with as little as 7 GiB (getrlimit returns 2**63)", +) def test_rlimit(): resource = pytest.importorskip("resource") # decrease memory limit by one byte new_limit = memory_limit() - 1 - try: - resource.setrlimit(resource.RLIMIT_RSS, (new_limit, new_limit)) - assert memory_limit() == new_limit - except OSError: - pytest.skip("resource could not set the RSS limit") + resource.setrlimit(resource.RLIMIT_RSS, (new_limit, new_limit)) + assert memory_limit() == new_limit diff --git a/distributed/utils_test.py b/distributed/utils_test.py index 75d33940f0..943598a48e 100644 --- a/distributed/utils_test.py +++ b/distributed/utils_test.py @@ -1572,7 +1572,7 @@ def bump_rlimit(limit, desired): try: soft, hard = resource.getrlimit(limit) if soft < desired: - resource.setrlimit(limit, (desired, max(hard, desired))) + resource.setrlimit(limit, (desired, min(hard, desired))) except Exception as e: pytest.skip(f"rlimit too low ({soft}) and can't be increased: {e}")