From 158d3f1c2309d91850d710bffb0d6833a99072df Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Mon, 9 Sep 2019 13:30:44 +0100 Subject: [PATCH] Unflake ComponentLifecycleMethodThrowsExceptionTerminatesTheCircuit test (#13824) --- .../ComponentHubReliabilityTest.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Components/test/E2ETest/ServerExecutionTests/ComponentHubReliabilityTest.cs b/src/Components/test/E2ETest/ServerExecutionTests/ComponentHubReliabilityTest.cs index 8d770e64de..a84dd549ef 100644 --- a/src/Components/test/E2ETest/ServerExecutionTests/ComponentHubReliabilityTest.cs +++ b/src/Components/test/E2ETest/ServerExecutionTests/ComponentHubReliabilityTest.cs @@ -284,6 +284,17 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests [InlineData("afterrender-async-throw")] public async Task ComponentLifecycleMethodThrowsExceptionTerminatesTheCircuit(string id) { + if (id == "setparameters-async-throw") + { + // In the case of setparameters-async-throw, the exception isn't triggered until after + // a renderbatch. This would lead to timing-based flakiness, because that batch's ACK + // may be received either before or after the subsequent event that is meant to trigger + // circuit termination. If it was received before, then the circuit would be terminated + // prematurely by the OnRenderCompleted call. To avoid timing-based flakiness, we can + // just not send OnRenderCompleted calls as they aren't required for this scenario. + Client.ConfirmRenderBatch = false; + } + // Arrange var expectedError = "Unhandled exception in circuit .*"; var rootUri = ServerFixture.RootUri;