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

test(x/gov): fix flaky TestActivateVotingPeriod test #15153

Merged
merged 3 commits into from
Feb 24, 2023

Conversation

mark-rushakoff
Copy link
Member

Description

I noticed this fail on CI on an unrelated change. Upon investigation, the flaky failure occurred every time that the "expedited proposal" case ran before the "regular proposal" case, which happens fairly often due to randomized map iteration order.

Changing the testCases value from a map to a slice to keep the order fixed, allows the test to pass consistently. I assume using a fixed ordering matches the original intent of the test.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • confirmed that this PR does not change production code

I noticed this fail on CI on an unrelated change. Upon investigation,
the flaky failure occurred every time that the "expedited proposal" case
ran before the "regular proposal" case, which happens fairly often due
to randomized map iteration order.

Changing the testCases value from a map to a slice to keep the order
fixed, allows the test to pass consistently. I assume using a fixed
ordering matches the original intent of the test.
@mark-rushakoff mark-rushakoff requested a review from a team as a code owner February 24, 2023 14:34
@julienrbrt julienrbrt mentioned this pull request Feb 24, 2023
17 tasks
Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

Nice! One less in this list :) #9010

@julienrbrt julienrbrt enabled auto-merge (squash) February 24, 2023 15:07
@julienrbrt julienrbrt merged commit ff3fed2 into main Feb 24, 2023
@julienrbrt julienrbrt deleted the mr/fix-flaky-voting-period-test branch February 24, 2023 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants