Skip to content

Commit d1c969c

Browse files
committed
Tests: Prevent inf actor restarts on exceptions
Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent e4334c8 commit d1c969c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tests/test_frequenz_dispatch.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ async def actor_env() -> AsyncIterator[ActorTestEnv]:
7575
client=client,
7676
)
7777

78+
# pylint: disable=protected-access
79+
actor._restart_limit = 0
80+
7881
actor.start()
7982
try:
8083
yield ActorTestEnv(

tests/test_mananging_actor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ async def test_env() -> AsyncIterator[TestEnv]:
7777
updates_sender=updates_channel.new_sender(),
7878
)
7979

80+
# pylint: disable=protected-access
81+
runner_actor._restart_limit = 0
8082
runner_actor.start()
8183

8284
yield TestEnv(

0 commit comments

Comments
 (0)