Skip to content

Commit 0ecc548

Browse files
trying to fix concurrency issue
1 parent 8ffeec1 commit 0ecc548

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import asyncio
12
from collections.abc import Callable, Iterator
23
from datetime import UTC, datetime, timedelta
34

@@ -132,6 +133,7 @@ async def test_process_event_functions(
132133

133134
for _ in range(app_settings.RESOURCE_USAGE_TRACKER_MISSED_HEARTBEAT_COUNTER_FAIL):
134135
await check_running_services(initialized_app)
136+
await asyncio.sleep(1)
135137
# NOTE: As we are doing check that the modified field needs to be older then some
136138
# threshold, we need to make this field artificaly older in this test
137139
with postgres_db.connect() as con:

0 commit comments

Comments
 (0)