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 flappy integration test #785

Merged
merged 5 commits into from Jan 28, 2019
Merged

Conversation

mialinx
Copy link
Contributor

@mialinx mialinx commented Jan 22, 2019

Small maps (of 2 items) are randomized badly,
i.e. their keys has the same order almost always, but not always.
This leads to rare test failures in commands that depends on keys order,
such as untag (untag-all-03)

A Pull Request should be associated with an Issue.

We wish to have discussions in Issues. A single issue may be targeted by multiple PRs.
If you're offering a new feature or fixing anything, we'd like to know beforehand in Issues,
and potentially we'll be able to point development in a particular direction.

Related issue: https://github.com/github/orchestrator/issues/0123456789

Thank you! We are open to PRs, but please understand if for technical reasons we are unable to accept each and any PR

Description

This PR [briefly explain what is does]

In case this PR introduced Go code changes:

  • contributed code is using same conventions as original code
  • code is formatted via gofmt (please avoid goimports)
  • code is built via ./build.sh
  • code is tested via go test ./go/...

Small maps (of 2 items) are randomized badly,
i.e. their keys has the same order *almost* always, but not always.
This leads to rare test failures in commands that depends on keys order,
such as untag (untag-all-03)
Copy link
Collaborator

@shlomi-noach shlomi-noach left a comment

Choose a reason for hiding this comment

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

Thank you. I wonder if this shouldn't be the other way around: that the tests sort the results, and we keep randomized iteration in GetInstanceKeys(). I don't feel strongly either way.

@mialinx
Copy link
Contributor Author

mialinx commented Jan 24, 2019

If you don't rely on any particular order of GetInstanceKeys(), then this patch breaks nothing.

If you do rely on alphabetic order of GetInstanceKeys() (as it looks like in expected_output files and go/inst/tag_dao.go:Untag queries), then there is a bug and this patch fixes it.

@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=conductor January 28, 2019 06:39 Inactive
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=conductor January 28, 2019 06:58 Inactive
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=conductor January 28, 2019 07:07 Inactive
@shlomi-noach shlomi-noach had a problem deploying to production/mysql_cluster=conductor January 28, 2019 07:09 Failure
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=conductor January 28, 2019 07:10 Inactive
@shlomi-noach shlomi-noach merged commit 151029a into openark:master Jan 28, 2019
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