Skip to content

Commit f554736

Browse files
committed
Add a delay for the mock server to start, before creating a client
This should fix the random test failures in python 3.8, especially when testing multi-level formulas. Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 8554630 commit f554736

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/timeseries/mock_microgrid.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from __future__ import annotations
77

8+
import asyncio
89
import time
910
import typing
1011
from typing import Iterator, Tuple
@@ -78,6 +79,7 @@ async def start(self) -> Tuple[Sender[ComponentMetricRequest], ChannelRegistry]:
7879
channel registry.
7980
"""
8081
await self._server.start()
82+
await asyncio.sleep(0.1)
8183
return await self._init_client_and_actors()
8284

8385
@classmethod

0 commit comments

Comments
 (0)