Skip to content

Commit 3670243

Browse files
committed
Add a new actor_auto_restart_once fixture
This is useful to test that actors are being properly restarted. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 034ed05 commit 3670243

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,10 @@ def disable_actor_auto_restart() -> collections.abc.Iterator[None]:
4444
"""Disable auto-restart of actors while running tests."""
4545
with actor_restart_limit(0):
4646
yield
47+
48+
49+
@pytest.fixture
50+
def actor_auto_restart_once() -> collections.abc.Iterator[None]:
51+
"""Make actors restart only once."""
52+
with actor_restart_limit(1):
53+
yield

0 commit comments

Comments
 (0)