Skip to content

Commit 118021c

Browse files
authored
Fix TestRemoveDanglingTasks (#3426)
Unset SERVER_KEEP_SHIM_TASKS
1 parent 178abdc commit 118021c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/tests/_internal/server/background/tasks/test_process_instances.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ async def test_check_shim_check_instance_health(self, test_db, session: AsyncSes
396396
assert health_check.response == health_response.json()
397397

398398

399-
@pytest.mark.usefixtures("disable_maybe_install_components")
399+
@pytest.mark.usefixtures("disable_maybe_install_components", "turn_off_keep_shim_tasks_setting")
400400
class TestRemoveDanglingTasks:
401401
@pytest.fixture
402402
def disable_maybe_install_components(self, monkeypatch: pytest.MonkeyPatch) -> None:
@@ -405,6 +405,10 @@ def disable_maybe_install_components(self, monkeypatch: pytest.MonkeyPatch) -> N
405405
Mock(return_value=None),
406406
)
407407

408+
@pytest.fixture
409+
def turn_off_keep_shim_tasks_setting(self, monkeypatch: pytest.MonkeyPatch) -> None:
410+
monkeypatch.setattr("dstack._internal.server.settings.SERVER_KEEP_SHIM_TASKS", False)
411+
408412
@pytest.fixture
409413
def ssh_tunnel_mock(self) -> Generator[Mock, None, None]:
410414
with patch("dstack._internal.server.services.runner.ssh.SSHTunnel") as SSHTunnelMock:

0 commit comments

Comments
 (0)