-
Notifications
You must be signed in to change notification settings - Fork 5k
Move Select_AcceptNonBlocking_Success to non-parallel collection #57503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move Select_AcceptNonBlocking_Success to non-parallel collection #57503
Conversation
Tagging subscribers to this area: @dotnet/ncl Issue DetailsOn Unix, this test seems to be prone to IPv4-IPv6 port collision. Windows failures can be likely explained by timing issues on the CI (5 seconds can be strict with heavy parallel workloads), serialization should help with that as well. Fixes #41579
|
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
The only outerloop test failure is #1722. |
This is the test: [OuterLoop]
[Fact]
public static async Task Select_AcceptNonBlocking_Success()
{
using (Socket listenSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
{
int port = listenSocket.BindToAnonymousPort(IPAddress.Loopback);
listenSocket.Blocking = false;
listenSocket.Listen(5);
Task t = Task.Run(() => { DoAccept(listenSocket, 5); });
// Loop, doing connections and pausing between
for (int i = 0; i < 5; i++)
{
Thread.Sleep(50);
using (Socket connectSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
{
connectSocket.Connect(listenSocket.LocalEndPoint);
}
}
// Give the task 5 seconds to complete; if not, assume it's hung.
await t.WaitAsync(TimeSpan.FromSeconds(5));
}
}
@antonfirsov what does this mean? How does it fail?
This about the |
I realized that I was likely wrong with this. Even if
In my experience this is insufficient on a slow overloaded CI machine, we don't really know how much the timeout should be. Disabling parallelism usually makes thing much more deterministic. @tmds do you think we may be masking a bug with the serialization? |
No. I guess solving IPv4-IPv6 port collision was the main motivation for serializing this test. The drawback of serialization is that it increases the test run duration. |
On Unix, this test seems to be prone to IPv4-IPv6 port collision. Windows failures can be likely explained by timing issues on CI (5 seconds can be strict with heavy parallel workloads). Serialization should help with both problems.
Fixes #41579