-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
SmtpClientTest.SendMail_SendQUITOnDispose timeout on OSX #41687
Comments
Tagging subscribers to this area: @dotnet/ncl |
4 failures in last 4 days and nothing before in 90 days. This looks like regression @karelz |
This is the test that fails, for [Theory]
[InlineData(false)]
[InlineData(true)]
public async Task SendMail_SendQUITOnDispose(bool asyncSend)
{
bool quitMessageReceived = false;
using ManualResetEventSlim quitReceived = new ManualResetEventSlim();
using var server = new LoopbackSmtpServer();
server.OnQuitReceived += _ =>
{
quitMessageReceived = true;
quitReceived.Set();
};
using (SmtpClient client = server.CreateClient())
{
client.Credentials = new NetworkCredential("Foo", "Bar");
MailMessage msg = new MailMessage("[email protected]", "[email protected]", "hello", "howdydoo");
if (asyncSend)
{
await client.SendMailAsync(msg).TimeoutAfter((int)TimeSpan.FromSeconds(30).TotalMilliseconds);
}
else
{
client.Send(msg);
}
Assert.False(quitMessageReceived, "QUIT received");
}
// There is a latency between send/receive.
quitReceived.Wait(TimeSpan.FromSeconds(30));
Assert.True(quitMessageReceived, "QUIT message not received");
} From the exception, it seems it is throwing on
#41508 matches the timing. #41508 should only be changing behaviour when the This was reported against macOS, has it occurred on Linux? I will try to reproduce it on Linux. Maybe we need to increase the timeout used? |
All cases I saw were on OSX 10.14. I don't see direct correlation either but it is suspicious that the test verifies dispose behavior. I'm wondering if all this is timing....? But I don't know why it would be much? slower. |
What I see in Kusto, querying for
|
Triage: Check if it was 1 machine? Or if there are more random test failures on the OSX 10.14. |
I did 1000+ runs locally and I did not see any failure. |
I also wasn't able to repro it locally. Also, querying for long timeouted tests in last month shows me that this number is pretty high for
Query that I ran
It makes me think that it might be CI overload for Mac machines... |
As of today, there are still no additional failures for this test. I'm closing it for now, and will reopen if the failures re-appear. |
Test case
System.Net.Mail.Tests.SmtpClientTest.SendMail_SendQUITOnDispose(asyncSend: True)
System.Net.Mail.Tests.SmtpClientTest.SendMail_SendQUITOnDispose(asyncSend: False)
Failed on
net5.0-OSX-Debug-x64-CoreCLR_release-OSX.1014.Amd64.Open
https://dev.azure.com/dnceng/public/_build/results?buildId=796625&view=ms.vss-test-web.build-test-results-tab&runId=25205974&paneView=debug&resultId=167484
With
System.TimeoutException : Task timed out after 00:00:30
Stack trace
The text was updated successfully, but these errors were encountered: