From becd672cf276013678fea45c81461e0defccb078 Mon Sep 17 00:00:00 2001 From: Martin Tomka Date: Fri, 14 Jul 2023 09:21:59 +0200 Subject: [PATCH] Debug.Listeners.Clear --- .../Hedging/Controller/HedgingExecutionContextTests.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/Polly.Core.Tests/Hedging/Controller/HedgingExecutionContextTests.cs b/test/Polly.Core.Tests/Hedging/Controller/HedgingExecutionContextTests.cs index 437c3c1bec..b9c4f546c2 100644 --- a/test/Polly.Core.Tests/Hedging/Controller/HedgingExecutionContextTests.cs +++ b/test/Polly.Core.Tests/Hedging/Controller/HedgingExecutionContextTests.cs @@ -36,6 +36,10 @@ public HedgingExecutionContextTests() _resilienceContext = ResilienceContext.Get().Initialize(false); _resilienceContext.CancellationToken = _cts.Token; _resilienceContext.Properties.Set(_myKey, "dummy"); + + // HedgingExecutionContext has some Debug.Assert pieces which trigger failures in Debug mode + // just suppress these + Trace.Listeners.Clear(); } public void Dispose()