Skip to content

Commit f2e4ddf

Browse files
authored
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
1 parent 0a837d3 commit f2e4ddf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/libraries/System.Net.Sockets/tests/FunctionalTests/Connect.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public async Task Connect_AfterDisconnect_Fails()
137137
[InlineData("[::ffff:1.1.1.1]", true, false)]
138138
public async Task ConnectGetsCanceledByDispose(string addressString, bool useDns, bool owning)
139139
{
140-
if (UsesSync && !PlatformDetection.IsWindows)
140+
if (UsesSync && PlatformDetection.IsLinux)
141141
{
142142
// [ActiveIssue("https://github.com/dotnet/runtime/issues/94149", TestPlatforms.Linux)]
143143
return;

src/libraries/System.Net.Sockets/tests/FunctionalTests/TelemetryTest.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,18 @@ await listener.RunWithCallbackAsync(e => events.Enqueue((e, e.ActivityId)), asyn
187187
}, connectMethod, useDnsEndPoint.ToString()).Dispose();
188188
}
189189

190-
[ActiveIssue("https://github.com/dotnet/runtime/issues/94149", TestPlatforms.Linux)]
191190
[OuterLoop]
192191
[ConditionalTheory(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))]
193192
[SkipOnPlatform(TestPlatforms.OSX | TestPlatforms.FreeBSD, "Same as Connect.ConnectGetsCanceledByDispose")]
194193
[MemberData(nameof(SocketMethods_WithBools_MemberData))]
195194
public void EventSource_SocketConnectFailure_LogsConnectFailed(string connectMethod, bool useDnsEndPoint)
196195
{
196+
if (connectMethod == "Sync" && PlatformDetection.IsLinux)
197+
{
198+
// [ActiveIssue("https://github.com/dotnet/runtime/issues/94149", TestPlatforms.Linux)]
199+
return;
200+
}
201+
197202
RemoteExecutor.Invoke(async (connectMethod, useDnsEndPointString) =>
198203
{
199204
EndPoint endPoint = await GetRemoteEndPointAsync(useDnsEndPointString, port: 12345);

0 commit comments

Comments
 (0)