From 6eb3e9022e41fc137e81d7be45be69561daefb4a Mon Sep 17 00:00:00 2001 From: CleverThis Date: Tue, 5 May 2026 08:01:17 +0000 Subject: [PATCH] fix(tests): remove dead step_assert_no_deadlocks and fix ruff formatting Removed the unreachable step_assert_no_deadlocks function from invariant_service_thread_safety_mixed_steps.py. The step was never referenced by any Gherkin scenario and contained a broken reference to context.elapsed_time which is never set, causing an AttributeError if the step were ever invoked. Applied ruff auto-formatting to fix trailing blank lines left after the removal. ISSUES CLOSED: #7524 --- .../steps/invariant_service_thread_safety_mixed_steps.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/features/steps/invariant_service_thread_safety_mixed_steps.py b/features/steps/invariant_service_thread_safety_mixed_steps.py index a5aef5b51..1a7896d97 100644 --- a/features/steps/invariant_service_thread_safety_mixed_steps.py +++ b/features/steps/invariant_service_thread_safety_mixed_steps.py @@ -219,12 +219,3 @@ def step_assert_results_consistent(context: Any) -> None: assert len(context.errors) == 0, ( f"Expected no errors, got {len(context.errors)}: {context.errors}" ) - - -@then("no deadlocks should occur") -def step_assert_no_deadlocks(context: Any) -> None: - """Assert that no deadlocks occurred by verifying the test completed in time.""" - assert context.elapsed_time < 30, ( - f"Test took {context.elapsed_time:.2f}s — possible deadlock or starvation" - ) -