From c8e990c36f5f8f0923aebc94c9cb49695d9b18b7 Mon Sep 17 00:00:00 2001 From: Sushant Date: Wed, 15 Jul 2026 22:11:34 +0530 Subject: [PATCH] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- archive/v1/tests/unit/test_health_concurrency.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/archive/v1/tests/unit/test_health_concurrency.py b/archive/v1/tests/unit/test_health_concurrency.py index 2d3e10c1..ba5429bc 100644 --- a/archive/v1/tests/unit/test_health_concurrency.py +++ b/archive/v1/tests/unit/test_health_concurrency.py @@ -54,5 +54,9 @@ async def run_test(): print("SUCCESS: Event loop remained fully responsive during metrics query!") sys.exit(0) -if __name__ == "__main__": - asyncio.run(run_test()) +@pytest.mark.asyncio +async def test_get_system_metrics_does_not_starve_event_loop(): + max_gap, duration = await run_test() + # ticker sleeps 0.1s; allow slack for CI, but we should not see ~1s gaps + assert max_gap < 0.6 + assert duration < 0.6