diff --git a/tests/integration/test_scheduler_heap_stress.py b/tests/integration/test_scheduler_heap_stress.py index 4add431f7c..3c757bfc9d 100644 --- a/tests/integration/test_scheduler_heap_stress.py +++ b/tests/integration/test_scheduler_heap_stress.py @@ -29,7 +29,7 @@ async def test_scheduler_heap_stress( ) # Create a future to signal test completion - loop = asyncio.get_event_loop() + loop = asyncio.get_running_loop() test_complete_future: asyncio.Future[None] = loop.create_future() # Track executed timeouts/intervals and their order diff --git a/tests/integration/test_scheduler_rapid_cancellation.py b/tests/integration/test_scheduler_rapid_cancellation.py index f38c5ebb57..89c41a4c33 100644 --- a/tests/integration/test_scheduler_rapid_cancellation.py +++ b/tests/integration/test_scheduler_rapid_cancellation.py @@ -29,7 +29,7 @@ async def test_scheduler_rapid_cancellation( ) # Create a future to signal test completion - loop = asyncio.get_event_loop() + loop = asyncio.get_running_loop() test_complete_future: asyncio.Future[None] = loop.create_future() # Track test progress diff --git a/tests/integration/test_scheduler_recursive_timeout.py b/tests/integration/test_scheduler_recursive_timeout.py index acd03215d1..c015978e15 100644 --- a/tests/integration/test_scheduler_recursive_timeout.py +++ b/tests/integration/test_scheduler_recursive_timeout.py @@ -28,7 +28,7 @@ async def test_scheduler_recursive_timeout( ) # Create a future to signal test completion - loop = asyncio.get_event_loop() + loop = asyncio.get_running_loop() test_complete_future: asyncio.Future[None] = loop.create_future() # Track execution sequence diff --git a/tests/integration/test_scheduler_simultaneous_callbacks.py b/tests/integration/test_scheduler_simultaneous_callbacks.py index 60b87c3cfd..357e0aa397 100644 --- a/tests/integration/test_scheduler_simultaneous_callbacks.py +++ b/tests/integration/test_scheduler_simultaneous_callbacks.py @@ -29,7 +29,7 @@ async def test_scheduler_simultaneous_callbacks( ) # Create a future to signal test completion - loop = asyncio.get_event_loop() + loop = asyncio.get_running_loop() test_complete_future: asyncio.Future[None] = loop.create_future() # Track test progress