File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -216,11 +216,11 @@ def on_event(event_type: Event) -> Callable:
216216 assert on_system_info_count == len (on_system_info )
217217
218218
219- async def test_actor_handles_migrating_event_correctly (monkeypatch : pytest .MonkeyPatch ) -> None :
219+ @pytest .mark .parametrize ('_' , range (1000 ))
220+ async def test_actor_handles_migrating_event_correctly (monkeypatch : pytest .MonkeyPatch , _ : int ) -> None :
220221 """Test that Actor handles MIGRATING events correctly by emitting PERSIST_STATE."""
221222 # This should test whether when you get a MIGRATING event,
222223 # the Actor automatically emits the PERSIST_STATE event with data `{'isMigrating': True}`
223- monkeypatch .setenv (ApifyEnvVars .PERSIST_STATE_INTERVAL_MILLIS , '500' )
224224 monkeypatch .setenv (ApifyEnvVars .IS_AT_HOME , '1' )
225225 monkeypatch .setenv (ActorEnvVars .RUN_ID , 'asdf' )
226226
@@ -285,7 +285,7 @@ async def handler(websocket: websockets.asyncio.server.ServerConnection) -> None
285285
286286 await asyncio .sleep (1 )
287287
288- assert len (persist_state_events_data ) >= 3
288+ assert len (persist_state_events_data ) >= 2
289289
290290 print (persist_state_events_data )
291291
You can’t perform that action at this time.
0 commit comments