From 49f66c1723e862c1f99acee5135f5a8418cbf8dc Mon Sep 17 00:00:00 2001 From: Mikel Blanchard Date: Mon, 27 Sep 2021 13:14:22 -0700 Subject: [PATCH] Attempting to stabilize TestHttpServer tests. --- test/OpenTelemetry.Tests/Shared/TestHttpServer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/OpenTelemetry.Tests/Shared/TestHttpServer.cs b/test/OpenTelemetry.Tests/Shared/TestHttpServer.cs index 1f56b2d76af..921502f6f97 100644 --- a/test/OpenTelemetry.Tests/Shared/TestHttpServer.cs +++ b/test/OpenTelemetry.Tests/Shared/TestHttpServer.cs @@ -100,7 +100,8 @@ public void Dispose() { try { - this.listener?.Stop(); + this.listener.Close(); + this.httpListenerTask?.Wait(); } catch (ObjectDisposedException) {