Skip to content
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

test: hopefully deflaking echo integration test #4304

Merged
merged 3 commits into from
Aug 30, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
2 changes: 2 additions & 0 deletions test/integration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ envoy_cc_test(
srcs = [
"echo_integration_test.cc",
],
# This test must be run in exclusive mode: see comments in AddRemoveListener
tags = ["exclusive"],
deps = [
":integration_lib",
"//source/extensions/filters/network/echo:config",
Expand Down
4 changes: 4 additions & 0 deletions test/integration/echo_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ TEST_P(EchoIntegrationTest, AddRemoveListener) {
listener_removed.waitReady();

// Now connect. This should fail.
// In order for this test to work, it must be tagged as "exclusive" in its
// build file. Otherwise, it's possible that when the listener is destroyed
// above, another test would start listening on the released port, and this
// connect would unexpectedly succeed.
RawConnectionDriver connection2(
new_listener_port, buffer,
[&](Network::ClientConnection&, const Buffer::Instance&) -> void { FAIL(); }, version_);
Expand Down