Skip to content

Remove flaky test #15269

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

Merged
merged 2 commits into from
Oct 23, 2019
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
25 changes: 0 additions & 25 deletions src/Servers/HttpSys/test/FunctionalTests/ServerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -366,31 +366,6 @@ public void Server_SetConnectionLimitArgumentValidation_Success()
}
}

[ConditionalFact]
public async Task Server_SetConnectionLimit_Success()
{
using (Utilities.CreateDynamicHost(out var address, options =>
{
Assert.Null(options.MaxConnections);
options.MaxConnections = 3;
}, httpContext => Task.FromResult(0)))
{
using (var client1 = await SendHungRequestAsync("GET", address))
using (var client2 = await SendHungRequestAsync("GET", address))
{
using (var client3 = await SendHungRequestAsync("GET", address))
{
// Maxed out, refuses connection and throws
await Assert.ThrowsAsync<HttpRequestException>(() => SendRequestAsync(address));
}

// A connection has been closed, try again.
string responseText = await SendRequestAsync(address);
Copy link
Member

Choose a reason for hiding this comment

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

Would this test be reliable if we removed just this last request? Looking at the last failure, that seems to be where the problem is.

Do we have any other tests that verifies HttpSysOptions.MaxConnections actually does anything?

Copy link
Member

Choose a reason for hiding this comment

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

Do we have any other tests that verifies HttpSysOptions.MaxConnections actually does anything?

No, but all we've implemented is passing the option to HttpSys. There is no functionality at our layer to verify.

Copy link
Member

Choose a reason for hiding this comment

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

If we stopped passing the option to HttpSys, would any tests fail other than this one we're removing?

Copy link
Member

Choose a reason for hiding this comment

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

No.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do we have any other tests that verifies HttpSysOptions.MaxConnections actually does anything?

Yes

Assert.Equal(string.Empty, responseText);
}
}
}

[ConditionalFact]
public async Task Server_SetConnectionLimitChangeAfterStarted_Success()
{
Expand Down