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: lingering non deterministic tests #523

Merged
merged 1 commit into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion x/evidence/client/cli/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ func TestGetQueryCmd(t *testing.T) {
true,
},
"all evidence (default pagination)": {
[]string{},
[]string{
fmt.Sprintf("--%s=text", flags.FlagOutput),
},
Comment on lines +63 to +65
Copy link
Member Author

Choose a reason for hiding this comment

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

I think depending on the order of tests run, its possible for this test to return as json if the json test runs before it, so we just specify for this to return as text

func() client.Context {
bz, _ := encCfg.Codec.Marshal(&sdk.TxResponse{})
c := clitestutil.NewMockTendermintRPC(abci.ResponseQuery{
Expand Down
9 changes: 4 additions & 5 deletions x/gov/keeper/proposal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,12 @@ func (suite *KeeperTestSuite) TestDeleteProposalInVotingPeriod() {
}

func (suite *KeeperTestSuite) TestActivateVotingPeriod() {
testCases := map[string]struct {
testCases := []struct {
name string
expedited bool
}{
"regular proposal": {},
"expedited proposal": {
expedited: true,
},
{name: "regular proposal", expedited: false},
{name: "expedited proposal", expedited: true},
Comment on lines +115 to +120
Copy link
Member Author

Choose a reason for hiding this comment

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

Order matters for this tests, so we cant range over the map

}

for _, tc := range testCases {
Expand Down
Loading