Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Increase some of the DnsEndPointTest timeouts
  • Loading branch information
antonfirsov committed Aug 25, 2021
commit eeb0b21c5ed62764329331bd3eff4110a5db2e70
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void Socket_ConnectDnsEndPoint_SetSocketProperties_Success(SocketImplemen
}
}

[OuterLoop]
//[OuterLoop]
[Fact]
public void Socket_ConnectDnsEndPoint_Failure()
{
Expand Down Expand Up @@ -272,7 +272,7 @@ public void Socket_ConnectAsyncDnsEndPoint_HostNotFound()
bool willRaiseEvent = sock.ConnectAsync(args);
if (willRaiseEvent)
{
Assert.True(complete.WaitOne(TestSettings.PassingTestTimeout), "Timed out while waiting for connection");
Assert.True(complete.WaitOne(TimeSpan.FromSeconds(30)), "Timed out while waiting for connection");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would do it as TestSettings.PassingTestTimeout * 3 e.g. factor of baseline instead of hardcoded value.
(or add new constant)

Copy link
Contributor Author

@antonfirsov antonfirsov Aug 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can rename the 10 sec PassingTestTimeout to PassingTestShortTimeout, and define another constant PassingTestLongTimeout = 30 sec ?

But maybe better to do it in a separate PR, to keep the changes in this one minimal? (It's about to be backported.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be actually better to do the rename in the release/* branches too to keep the code in sync, avoiding conflicts in future PR-s. I'm undecided.

complete.Dispose(); // only dispose on success as we know we're done with the instance
}

Expand Down Expand Up @@ -332,7 +332,7 @@ public void Socket_StaticConnectAsync_Success(SocketImplementationType type)

if (Socket.ConnectAsync(SocketType.Stream, ProtocolType.Tcp, args))
{
Assert.True(complete.WaitOne(TestSettings.PassingTestTimeout), "Timed out while waiting for connection");
Assert.True(complete.WaitOne(TimeSpan.FromSeconds(30)), "Timed out while waiting for connection");
}

Assert.Equal(SocketError.Success, args.SocketError);
Expand Down Expand Up @@ -404,7 +404,7 @@ public void Socket_StaticConnectAsync_HostNotFound()
OnConnectAsyncCompleted(null, args);
}

Assert.True(complete.WaitOne(TestSettings.PassingTestTimeout), "Timed out while waiting for connection");
Assert.True(complete.WaitOne(TimeSpan.FromSeconds(30)), "Timed out while waiting for connection");
complete.Dispose(); // only dispose on success as we know we're done with the instance

AssertHostNotFoundOrNoData(args);
Expand Down