Skip to content

Commit 864e7b9

Browse files
committed
disable gc in tests
1 parent 21caf27 commit 864e7b9

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

services/web/server/tests/unit/with_dbs/02/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@
3535
from simcore_service_webserver.projects.models import ProjectDict
3636

3737

38+
@pytest.fixture
39+
def app_environment(
40+
app_environment: dict[str, str], monkeypatch: pytest.MonkeyPatch
41+
) -> dict[str, str]:
42+
# NOTE: overrides app_environment
43+
monkeypatch.setenv("WEBSERVER_GARBAGE_COLLECTOR", "null")
44+
return app_environment | {"WEBSERVER_GARBAGE_COLLECTOR": "null"}
45+
46+
3847
@pytest.fixture
3948
def mock_service_resources() -> ServiceResourcesDict:
4049
return TypeAdapter(ServiceResourcesDict).validate_python(

services/web/server/tests/unit/with_dbs/02/test_projects_states_handlers.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,6 @@
7575
API_PREFIX = f"/{API_VTAG}"
7676

7777

78-
@pytest.fixture
79-
def app_environment(
80-
app_environment: EnvVarsDict, monkeypatch: pytest.MonkeyPatch
81-
) -> EnvVarsDict:
82-
# disable the garbage collector
83-
return app_environment | setenvs_from_dict(
84-
monkeypatch,
85-
{
86-
"WEBSERVER_GARBAGE_COLLECTOR": "null",
87-
"WEBSERVER_DEV_FEATURES_ENABLED": "1",
88-
},
89-
)
90-
91-
9278
@pytest.fixture
9379
def with_disabled_rtx_collaboration(
9480
app_environment: EnvVarsDict, monkeypatch: pytest.MonkeyPatch
@@ -738,7 +724,6 @@ async def test_open_project_with_small_amount_of_dynamic_services_starts_them_au
738724

739725
@pytest.mark.parametrize(*standard_user_role_response())
740726
async def test_open_project_with_disable_service_auto_start_set_overrides_behavior_collaboration_disabled(
741-
with_disabled_rtx_collaboration: EnvVarsDict,
742727
client: TestClient,
743728
logged_user: UserInfoDict,
744729
user_project_with_num_dynamic_services: Callable[[int], Awaitable[ProjectDict]],

0 commit comments

Comments
 (0)