Skip to content

test: fixing a teardown ordering bug#11542

Merged
alyssawilk merged 4 commits into
envoyproxy:masterfrom
alyssawilk:flake
Jun 11, 2020
Merged

test: fixing a teardown ordering bug#11542
alyssawilk merged 4 commits into
envoyproxy:masterfrom
alyssawilk:flake

Conversation

@alyssawilk
Copy link
Copy Markdown
Contributor

As (now) commented, when codecs access runtime, it creates a destruction order invariant that the fake upstreams are torn down before the server (and its runtime). Fixing this in the base integration test and cleaning up test sub-classes.

Risk Level: n/a (test only)
Testing: http2 test passes cleanly with 200 runs (where before it flaked out)
Docs Changes: n/a
Release Notes: n/a
Fixes #11538

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
// Tear down the fake upstream before the test server.
// When the HTTP codecs do runtime checks, it is important to finish all
// runtime access before the server, and the runtime singleton, go away.
fake_upstreams_.clear();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you could also reverse declarations of test_server_ and fake_upstreams_ in the class and have C++ enforce the cleanup order. If you are into that sort of thing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I thought about that, but I was concerned there might be other things that needed to go before the server.

I should just be non-lazy and put it at the top :-P

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Actually yeah, if I move it up something else fails.
How about we land this to remove the flake and I file a tracking issue for cleaning up the tests a bit?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@yanavlasov
Copy link
Copy Markdown
Contributor

Thanks for tracking this down.

Copy link
Copy Markdown
Contributor

@snowp snowp left a comment

Choose a reason for hiding this comment

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

Thanks!

@alyssawilk alyssawilk merged commit 4a91d7f into envoyproxy:master Jun 11, 2020
arthuryan-k pushed a commit to arthuryan-k/envoy that referenced this pull request Jun 15, 2020
As (now) commented, when codecs access runtime, it creates a destruction order invariant that the fake upstreams are torn down before the server (and its runtime). Fixing this in the base integration test and cleaning up test sub-classes.

Risk Level: n/a (test only)
Testing: http2 test passes cleanly with 200 runs (where before it flaked out)
Docs Changes: n/a
Release Notes: n/a
Fixes envoyproxy#11538

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Arthur Yan <arthuryan@google.com>
yashwant121 pushed a commit to yashwant121/envoy that referenced this pull request Jun 24, 2020
As (now) commented, when codecs access runtime, it creates a destruction order invariant that the fake upstreams are torn down before the server (and its runtime). Fixing this in the base integration test and cleaning up test sub-classes.

Risk Level: n/a (test only)
Testing: http2 test passes cleanly with 200 runs (where before it flaked out)
Docs Changes: n/a
Release Notes: n/a
Fixes envoyproxy#11538

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: yashwant121 <yadavyashwant36@gmail.com>
songhu pushed a commit to songhu/envoy that referenced this pull request Jun 25, 2020
As (now) commented, when codecs access runtime, it creates a destruction order invariant that the fake upstreams are torn down before the server (and its runtime). Fixing this in the base integration test and cleaning up test sub-classes.

Risk Level: n/a (test only)
Testing: http2 test passes cleanly with 200 runs (where before it flaked out)
Docs Changes: n/a
Release Notes: n/a
Fixes envoyproxy#11538

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
yashwant121 pushed a commit to yashwant121/envoy that referenced this pull request Jul 24, 2020
As (now) commented, when codecs access runtime, it creates a destruction order invariant that the fake upstreams are torn down before the server (and its runtime). Fixing this in the base integration test and cleaning up test sub-classes.

Risk Level: n/a (test only)
Testing: http2 test passes cleanly with 200 runs (where before it flaked out)
Docs Changes: n/a
Release Notes: n/a
Fixes envoyproxy#11538

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: yashwant121 <yadavyashwant36@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

http2_integration_test flood test flake

3 participants