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

Fix flakiness of have-key-with-value test #256

Conversation

OmarDarwish
Copy link
Contributor

The gomega have-key-with value test was flaky because of ranging over a map in Go is not deterministic so the order that submatchers being passed to gomega.And was unpredictable. This caused the test to sometimes pass and sometimes fail.

This commit fixes this by ensuring that mapToGomega sorts keys before iterating through map values.

@elliotweiser
Copy link
Contributor

@OmarDarwish Thanks for this!

@aelsabbahy aelsabbahy merged commit e314689 into goss-org:master Jul 5, 2017
BenjaminHerbert pushed a commit to BenjaminHerbert/goss that referenced this pull request May 28, 2020
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.

3 participants