test: fixing a teardown ordering bug#11542
Merged
Merged
Conversation
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
yanavlasov
reviewed
Jun 11, 2020
| // 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(); |
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
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
Contributor
Author
There was a problem hiding this comment.
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?
Contributor
|
Thanks for tracking this down. |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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