Skip to content

Commit 89f8227

Browse files
fix
1 parent c974bb1 commit 89f8227

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

services/resource-usage-tracker/tests/unit/with_dbs/test_background_task_periodic_heartbeat_check.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ def resource_tracker_setup_db(
121121
con.execute(resource_tracker_service_runs.delete())
122122

123123

124+
_PROD_RUN_INTERVAL_SEC = 1 # in reality in production this is 5 mins
125+
126+
124127
async def test_process_event_functions(
125128
create_rabbitmq_client: Callable[[str], RabbitMQClient],
126129
mocked_redis_server: None,
@@ -133,7 +136,7 @@ async def test_process_event_functions(
133136

134137
for _ in range(app_settings.RESOURCE_USAGE_TRACKER_MISSED_HEARTBEAT_COUNTER_FAIL):
135138
await check_running_services(initialized_app)
136-
await asyncio.sleep(1)
139+
await asyncio.sleep(_PROD_RUN_INTERVAL_SEC)
137140
# NOTE: As we are doing check that the modified field needs to be older then some
138141
# threshold, we need to make this field artificaly older in this test
139142
with postgres_db.connect() as con:

0 commit comments

Comments
 (0)