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

Make iteration order for Go maps consistent #518

Merged
merged 1 commit into from Sep 13, 2021

Conversation

akonradi
Copy link
Contributor

Sort the keys before iteration to make the iteration order
deterministic. This fixes a test flake where the first error returned by
ValidateAll() didn't match the error returned by Validate(). Since the
iteration order was unspecified, ValidateAll() would sometimes return
the same set of errors in different orders.

Signed-off-by: Alex Konradi akonradi@google.com

Sort the keys before iteration to make the iteration order
deterministic. This fixes a test flake where the first error returned by
ValidateAll() didn't match the error returned by Validate(). Since the
iteration order was unspecified, ValidateAll() would sometimes return
the same set of errors in different orders.

Signed-off-by: Alex Konradi <akonradi@google.com>
@akonradi
Copy link
Contributor Author

Java and Python test failures will be addressed by #517

@akonradi akonradi merged commit a3fe54e into bufbuild:main Sep 13, 2021
@akonradi akonradi deleted the test-flakes branch September 13, 2021 13:43
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.

None yet

2 participants