From e8d936444296204a94bd53060717b5e37a8091ee Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 3 May 2024 16:24:25 +0100 Subject: [PATCH] Skip tests on Fedora 39 --- .../integration/daemons/test_memory_leak.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/pytests/integration/daemons/test_memory_leak.py b/tests/pytests/integration/daemons/test_memory_leak.py index d61bb85b736..d9566be6e16 100644 --- a/tests/pytests/integration/daemons/test_memory_leak.py +++ b/tests/pytests/integration/daemons/test_memory_leak.py @@ -1,5 +1,5 @@ +import multiprocessing import time -from multiprocessing import Manager, Process import psutil import pytest @@ -7,6 +7,13 @@ import pytest pytestmark = [ pytest.mark.slow_test, pytest.mark.timeout_unless_on_windows(360), + pytest.mark.skip_on_fips_enabled_platform, + pytest.mark.skip_on_windows(reason="Windows is a spawning platform, won't work"), + pytest.mark.skip_on_darwin(reason="MacOS is a spawning platform, won't work"), + pytest.mark.skipif( + 'grains["osfinger"] == "Fedora Linux-39"', + reason="vim package not available for this distrubition", + ), ] @@ -37,15 +44,12 @@ def file_add_delete_sls(tmp_path, salt_master): yield sls_name -@pytest.mark.skip_on_fips_enabled_platform -@pytest.mark.skip_on_windows(reason="Windows is a spawning platform, won't work") -@pytest.mark.skip_on_darwin(reason="MacOS is a spawning platform, won't work") @pytest.mark.flaky(max_runs=4) def test_memory_leak(salt_cli, salt_minion, file_add_delete_sls): max_usg = None # Using shared variables to be able to send a stop flag to the process - with Manager() as manager: + with multiprocessing.Manager() as manager: done_flag = manager.list() during_run_data = manager.list() @@ -55,7 +59,7 @@ def test_memory_leak(salt_cli, salt_minion, file_add_delete_sls): usg = psutil.virtual_memory() data.append(usg.total - usg.available) - proc = Process(target=_func, args=(during_run_data, done_flag)) + proc = multiprocessing.Process(target=_func, args=(during_run_data, done_flag)) proc.start() # Try to drive up memory usage