From e1417b0e568de5c069ba2b9d9d66510d653bbdf9 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Fri, 26 Jul 2019 22:24:39 -0400 Subject: [PATCH] Fix SendAsync_SuppressedGlobalStaticPropagationNoListenerAppCtx test (dotnet/corefx#39795) Commit migrated from https://github.com/dotnet/corefx/commit/8a6389529afdc0dd53d4c94fe665695ec54c21af --- .../tests/FunctionalTests/DiagnosticsTests.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs index 593115f..2565533 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs @@ -1090,14 +1090,13 @@ namespace System.Net.Http.Functional.Tests }, envVarValue, isInstrumentationEnabled.ToString()).Dispose(); } - [ActiveIssue(39691)] [OuterLoop("Uses external server")] [Theory] - [InlineData(true, false)] - [InlineData(false, true)] - public void SendAsync_SuppressedGlobalStaticPropagationNoListenerAppCtx(bool switchValue, bool isInstrumentationEnabled) + [InlineData(true)] + [InlineData(false)] + public void SendAsync_SuppressedGlobalStaticPropagationNoListenerAppCtx(bool switchValue) { - RemoteExecutor.Invoke((innerSwitchValue, innerIsInstrumentationEnabled) => + RemoteExecutor.Invoke(innerSwitchValue => { AppContext.SetSwitch(EnableActivityPropagationAppCtxSettingName, bool.Parse(innerSwitchValue)); @@ -1106,12 +1105,12 @@ namespace System.Net.Http.Functional.Tests Activity parent = new Activity("parent").Start(); using HttpResponseMessage response = client.GetAsync(Configuration.Http.RemoteEchoServer).Result; parent.Stop(); - Assert.Equal(bool.Parse(innerIsInstrumentationEnabled), response.RequestMessage.Headers.Contains( + Assert.Equal(bool.Parse(innerSwitchValue), response.RequestMessage.Headers.Contains( parent.IdFormat == ActivityIdFormat.Hierarchical ? "Request-Id" : "traceparent")); } return RemoteExecutor.SuccessExitCode; - }, switchValue.ToString(), isInstrumentationEnabled.ToString()).Dispose(); + }, switchValue.ToString()).Dispose(); } [ActiveIssue(23209)] -- 2.7.4