File tree 1 file changed +3
-8
lines changed
services/clusters-keeper/tests/unit
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 13
13
from pytest_simcore .helpers .monkeypatch_envs import EnvVarsDict , setenvs_from_dict
14
14
from simcore_service_clusters_keeper .core .settings import ApplicationSettings
15
15
16
- _FAST_POLL_INTERVAL = "00:00:01"
17
-
18
16
19
17
@pytest .fixture
20
18
def app_environment (
21
19
app_environment : EnvVarsDict ,
22
20
monkeypatch : pytest .MonkeyPatch ,
23
21
) -> EnvVarsDict :
24
22
return app_environment | setenvs_from_dict (
25
- monkeypatch , {"CLUSTERS_KEEPER_TASK_INTERVAL" : _FAST_POLL_INTERVAL }
23
+ monkeypatch , {"CLUSTERS_KEEPER_TASK_INTERVAL" : "00:00:01" }
26
24
)
27
25
28
26
@@ -43,10 +41,7 @@ async def test_clusters_management_task_created_and_deleted(
43
41
initialized_app : FastAPI ,
44
42
app_settings : ApplicationSettings ,
45
43
):
46
- assert (
47
- app_settings .CLUSTERS_KEEPER_TASK_INTERVAL .total_seconds ()
48
- == _FAST_POLL_INTERVAL
49
- )
44
+ assert app_settings .CLUSTERS_KEEPER_TASK_INTERVAL .total_seconds () == 1
50
45
assert hasattr (initialized_app .state , "clusters_cleaning_task" )
51
- await asyncio .sleep (5 * _FAST_POLL_INTERVAL )
46
+ await asyncio .sleep (5 )
52
47
mock_background_task .assert_called ()
You can’t perform that action at this time.
0 commit comments