stats: Don't expect vec.front() to be predictable when populated from unordered container#4573
Merged
mattklein123 merged 4 commits intoenvoyproxy:masterfrom Oct 1, 2018
Merged
Conversation
…red container. Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
mattklein123
reviewed
Oct 1, 2018
Member
mattklein123
left a comment
There was a problem hiding this comment.
Thanks for fixing. 1 question.
the existing ones in TestUtility. At first I thought I didn't need the new function at all, and then I realized the existing helper functions didn't address .cachedCounters(), so I decided to move that template function to utility.h and make the existing functions be one-liner calls to that. Signed-off-by: Joshua Marantz <jmarantz@google.com>
…replacement call to use findByName was already added. Signed-off-by: Joshua Marantz <jmarantz@google.com>
aa-stripe
pushed a commit
to aa-stripe/envoy
that referenced
this pull request
Oct 11, 2018
… unordered container (envoyproxy#4573) Signed-off-by: Joshua Marantz <jmarantz@google.com> Signed-off-by: Aaltan Ahmad <aa@stripe.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.
Description: thread_local_store iterates over unordered_maps to implement counters(), etc. Some of the tests for it had two stats, but were expecting the first vector element to be a particular value. This makes the test dependent on hashes and unordered_map implementation.
Risk Level: low
Testing: //test/common/stats:thread_local_store_test
Docs Changes: n/a
Release Notes: n/a
*Fixes #Issue: #4572