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: fix flakiness due to duplicate denoms #15223

Merged
merged 1 commit into from
Mar 1, 2023

Conversation

mark-rushakoff
Copy link
Member

Description

On CI, with an unrelated change, we observed
TestGRPCQuerySpendableBalances failing with this message:

deterministic_test.go:156: [rapid] panic after 26 tests: invalid coin set 1A..,1A..: duplicate denomination A..

This occurred at: https://github.com/cosmos/cosmos-sdk/actions/runs/4304610752/jobs/7505884172#step:5:42

As noted in the message, this was reproducible with passing -rapid.seed=17310147078983591311.

Instead of several independent calls to producing a string with rapid, prefer rapid.SliceOfNDistinct in order to ensure that all denoms are unique, thereby avoiding the panic in sdk.NewCoins.


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

On CI, with an unrelated change, we observed
TestGRPCQuerySpendableBalances failing with this message:

deterministic_test.go:156: [rapid] panic after 26 tests: invalid coin set 1A..,1A..: duplicate denomination A..

This occurred at: https://github.com/cosmos/cosmos-sdk/actions/runs/4304610752/jobs/7505884172#step:5:42

As noted in the message, this was reproducible with passing
-rapid.seed=17310147078983591311.

Instead of several independent calls to producing a string with rapid,
prefer rapid.SliceOfNDistinct in order to ensure that all denoms are
unique, thereby avoiding the panic in sdk.NewCoins.
@mark-rushakoff mark-rushakoff requested a review from a team as a code owner March 1, 2023 16:02
@alexanderbez alexanderbez enabled auto-merge (squash) March 1, 2023 16:21
@alexanderbez alexanderbez merged commit e33c5a7 into main Mar 1, 2023
@alexanderbez alexanderbez deleted the mr/flaky-rapid-denom-dup branch March 1, 2023 16:22
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.

2 participants