From 3994ead6eb5859b4864999aea0d4ba80660a0963 Mon Sep 17 00:00:00 2001 From: Ahmet Ibrahim Aksoy Date: Mon, 30 Oct 2023 10:57:44 +0100 Subject: [PATCH 1/3] Fix Not IsWindows to IsLinux on test disable --- .../System.Net.Sockets/tests/FunctionalTests/Connect.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/Connect.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/Connect.cs index f5b702d8ec77a6..7c8afc925f7388 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; From 0a27a82e5460089296043f7f5ad5f4d661c05eb4 Mon Sep 17 00:00:00 2001 From: Ahmet Ibrahim Aksoy Date: Mon, 30 Oct 2023 15:49:34 +0100 Subject: [PATCH 2/3] Match TelemetryTest behavior with Connect Test --- .../tests/FunctionalTests/TelemetryTest.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs index 6886fa15e45d0b..af1449b31133bb 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 (UsesSync && 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); From 332102f90d3554e6b56894b8ae6cce21bdf102e1 Mon Sep 17 00:00:00 2001 From: Ahmet Ibrahim Aksoy Date: Mon, 30 Oct 2023 18:26:06 +0100 Subject: [PATCH 3/3] Change to use connectMethod --- .../System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs index af1449b31133bb..0f342572c6c6bf 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs @@ -193,7 +193,7 @@ await listener.RunWithCallbackAsync(e => events.Enqueue((e, e.ActivityId)), asyn [MemberData(nameof(SocketMethods_WithBools_MemberData))] public void EventSource_SocketConnectFailure_LogsConnectFailed(string connectMethod, bool useDnsEndPoint) { - if (UsesSync && PlatformDetection.IsLinux) + if (connectMethod == "Sync" && PlatformDetection.IsLinux) { // [ActiveIssue("https://github.com/dotnet/runtime/issues/94149", TestPlatforms.Linux)] return;