From b7b92ec3fc7bef0ab6c209cbf99405f8f8f9ab1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Mon, 12 Feb 2024 19:23:26 +0100 Subject: [PATCH] Removing now unnecessary retry --- .../TestCaseUITestContextExtensions.cs | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/Lombiq.Walkthroughs.Test.UI/Extensions/TestCaseUITestContextExtensions.cs b/Lombiq.Walkthroughs.Test.UI/Extensions/TestCaseUITestContextExtensions.cs index c7bed80..4525dfd 100644 --- a/Lombiq.Walkthroughs.Test.UI/Extensions/TestCaseUITestContextExtensions.cs +++ b/Lombiq.Walkthroughs.Test.UI/Extensions/TestCaseUITestContextExtensions.cs @@ -413,11 +413,7 @@ await AssertStepAndClickNextAsync( await AssertStepAndClickShepherdTargetAsync("Audit Trail", "Click on \"Audit Trail\"."); await AssertStepAndClickNextAsync("Audit Trail", "Here you can see and turn on or off all the events"); await AssertStepAndClickShepherdTargetAsync("Audit Trail", "Click here to see the trimming settings."); - // For some reason (perhaps because it's at the very bottom of the page), clicking Next on this step is flaky, - // so need to retry. - await RetryTimeoutStepAsync( - () => AssertStepAndClickNextAsync("Audit Trail", "To not let the Audit Trail database grow indefinitely"), - "Attempting to leave the Trimming tab of the Audit Trail didn't succeed even after 5 attempts."); + await AssertStepAndClickNextAsync("Audit Trail", "To not let the Audit Trail database grow indefinitely"); await AssertStepAndClickShepherdTargetAsync("Audit Trail", "Click here to see the content types whose events"); await AssertStepAndClickNextAsync("Audit Trail", "These are the content whose events are currently recorded."); await AssertStepAndClickShepherdTargetAsync("Audit Trail", "Now let's see how we can see the details of the"); @@ -533,27 +529,4 @@ await AssertStepAndClickNextAsync( () => AssertStep( "Walkthrough completed", "Congratulations! You completed the walkthrough.", assertShepherdTargetIsNotBody: false)); } - - private static async Task RetryTimeoutStepAsync(Func stepAsync, string exceptionMessage) - { - var trimmingStepLeft = false; - var trimmingStepLeaveAttemptIndex = 0; - while (!trimmingStepLeft) - { - try - { - await stepAsync(); - trimmingStepLeft = true; - } - catch (TimeoutException) - { - trimmingStepLeaveAttemptIndex++; - - // False alarm: https://github.com/SonarSource/sonar-dotnet/issues/8736. -#pragma warning disable S2583 // Conditionally executed code should be reachable - if (trimmingStepLeaveAttemptIndex == 5) throw new TimeoutException(exceptionMessage); -#pragma warning restore S2583 // Conditionally executed code should be reachable - } - } - } }