mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Increase timeouts on problematic test
This commit is contained in:
parent
ed67c89403
commit
c3826c6143
1 changed files with 7 additions and 14 deletions
|
@ -6,19 +6,15 @@ import pytest
|
|||
|
||||
pytestmark = [
|
||||
pytest.mark.slow_test,
|
||||
pytest.mark.timeout_unless_on_windows(240),
|
||||
pytest.mark.timeout_unless_on_windows(360),
|
||||
]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def testfile_path(tmp_path):
|
||||
return tmp_path / "testfile"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def file_add_delete_sls(testfile_path, base_env_state_tree_root_dir):
|
||||
def file_add_delete_sls(tmp_path, salt_master):
|
||||
path = tmp_path / "testfile"
|
||||
sls_name = "file_add"
|
||||
sls_contents = """
|
||||
sls_contents = f"""
|
||||
add_file:
|
||||
file.managed:
|
||||
- name: {path}
|
||||
|
@ -36,16 +32,13 @@ def file_add_delete_sls(testfile_path, base_env_state_tree_root_dir):
|
|||
echo:
|
||||
cmd.run:
|
||||
- name: \"echo 'This is a test!'\"
|
||||
""".format(
|
||||
path=testfile_path
|
||||
)
|
||||
with pytest.helpers.temp_file(
|
||||
"{}.sls".format(sls_name), sls_contents, base_env_state_tree_root_dir
|
||||
):
|
||||
"""
|
||||
with salt_master.state_tree.base.temp_file(f"{sls_name}.sls", sls_contents):
|
||||
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):
|
||||
|
|
Loading…
Add table
Reference in a new issue