Skip to content

Commit

Permalink
fix seq num issue
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic committed Feb 1, 2024
1 parent 6012369 commit 6f1061b
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/e2e/auth/vesting/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,12 @@ func (s *E2ETestSuite) TestNewMsgCreateClawbackVestingAccountCmd() {
expectErr: true,
},
} {
// Synchronize height between test runs, to ensure sequence numbers are
// properly updated.
height, err := s.network.LatestHeight()
s.Require().NoError(err, "Getting initial latest height")
s.T().Logf("Initial latest height: %d", height)

s.Run(tc.name, func() {
clientCtx := val.ClientCtx

Expand All @@ -372,6 +378,10 @@ func (s *E2ETestSuite) TestNewMsgCreateClawbackVestingAccountCmd() {
s.Require().Equal(tc.expectedCode, txResp.Code)
}
})
next, err := s.network.WaitForHeight(height + 1)
s.Require().NoError(err, "Waiting for height...")
height = next
s.T().Logf("Height now: %d", height)
}
}

Expand All @@ -395,6 +405,16 @@ func (s *E2ETestSuite) TestNewMsgClawbackCmd() {
})
s.Require().NoError(err)

// Synchronize height between test runs, to ensure sequence numbers are
// properly updated.
height, err := s.network.LatestHeight()
s.Require().NoError(err, "Getting initial latest height")
s.T().Logf("Initial latest height: %d", height)
next, err := s.network.WaitForHeight(height + 1)
s.Require().NoError(err, "Waiting for height...")
height = next
s.T().Logf("Height now: %d", height)

for _, tc := range []struct {
name string
args []string
Expand Down Expand Up @@ -445,6 +465,12 @@ func (s *E2ETestSuite) TestNewMsgClawbackCmd() {
respType: &sdk.TxResponse{},
},
} {
// Synchronize height between test runs, to ensure sequence numbers are
// properly updated.
height, err := s.network.LatestHeight()
s.Require().NoError(err, "Getting initial latest height")
s.T().Logf("Initial latest height: %d", height)

s.Run(tc.name, func() {
clientCtx := val.ClientCtx

Expand All @@ -459,5 +485,9 @@ func (s *E2ETestSuite) TestNewMsgClawbackCmd() {
s.Require().Equal(tc.expectedCode, txResp.Code)
}
})
next, err := s.network.WaitForHeight(height + 1)
s.Require().NoError(err, "Waiting for height...")
height = next
s.T().Logf("Height now: %d", height)
}
}

0 comments on commit 6f1061b

Please sign in to comment.