From f2e4ddf20936b37445bbbb2d139e8080ca00f16c Mon Sep 17 00:00:00 2001 From: Ahmet Ibrahim Aksoy Date: Tue, 31 Oct 2023 14:27:02 +0100 Subject: [PATCH] Change Not IsWindows condition to IsLinux on Socket test disable (#94163) * Fix Not IsWindows to IsLinux on test disable * Match TelemetryTest behavior with Connect Test * Change to use connectMethod --- .../System.Net.Sockets/tests/FunctionalTests/Connect.cs | 2 +- .../tests/FunctionalTests/TelemetryTest.cs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/Connect.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/Connect.cs index f5b702d8ec77a..7c8afc925f738 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/Connect.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/Connect.cs @@ -137,7 +137,7 @@ public async Task Connect_AfterDisconnect_Fails() [InlineData("[::ffff:1.1.1.1]", true, false)] public async Task ConnectGetsCanceledByDispose(string addressString, bool useDns, bool owning) { - if (UsesSync && !PlatformDetection.IsWindows) + if (UsesSync && PlatformDetection.IsLinux) { // [ActiveIssue("https://github.com/dotnet/runtime/issues/94149", TestPlatforms.Linux)] return; diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs index 6886fa15e45d0..0f342572c6c6b 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs @@ -187,13 +187,18 @@ await listener.RunWithCallbackAsync(e => events.Enqueue((e, e.ActivityId)), asyn }, connectMethod, useDnsEndPoint.ToString()).Dispose(); } - [ActiveIssue("https://github.com/dotnet/runtime/issues/94149", TestPlatforms.Linux)] [OuterLoop] [ConditionalTheory(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] [SkipOnPlatform(TestPlatforms.OSX | TestPlatforms.FreeBSD, "Same as Connect.ConnectGetsCanceledByDispose")] [MemberData(nameof(SocketMethods_WithBools_MemberData))] public void EventSource_SocketConnectFailure_LogsConnectFailed(string connectMethod, bool useDnsEndPoint) { + if (connectMethod == "Sync" && PlatformDetection.IsLinux) + { + // [ActiveIssue("https://github.com/dotnet/runtime/issues/94149", TestPlatforms.Linux)] + return; + } + RemoteExecutor.Invoke(async (connectMethod, useDnsEndPointString) => { EndPoint endPoint = await GetRemoteEndPointAsync(useDnsEndPointString, port: 12345);