chore: attempt to fix flakey test (#24009)

This commit is contained in:
Alex | Interchain Labs
2025-03-17 09:25:32 -04:00
committed by GitHub
parent f804b4ae3b
commit 5f36263548
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -87,7 +87,10 @@ func (s *IntegrationTestSuite) TestQueryABCIHeight() {
for _, tc := range testCases {
s.Run(tc.name, func() {
s.network.WaitForHeight(tc.expHeight)
gotHeight, err := s.network.WaitForHeight(tc.expHeight)
if gotHeight != tc.expHeight {
s.Fail(err.Error())
}
val := s.network.Validators[0]
+2 -2
View File
@@ -703,7 +703,7 @@ func (n *Network) LatestHeight() (int64, error) {
// committed after a given block. If that height is not reached within a timeout,
// an error is returned. Regardless, the latest height queried is returned.
func (n *Network) WaitForHeight(h int64) (int64, error) {
return n.WaitForHeightWithTimeout(h, 10*time.Second)
return n.WaitForHeightWithTimeout(h, 20*time.Second)
}
// WaitForHeightWithTimeout is the same as WaitForHeight except the caller can
@@ -745,7 +745,7 @@ func (n *Network) WaitForHeightWithTimeout(h int64, t time.Duration) (int64, err
// blocks has been reached.
func (n *Network) RetryForBlocks(retryFunc func() error, blocks int) error {
for i := 0; i < blocks; i++ {
n.WaitForNextBlock()
_ = n.WaitForNextBlock() // ignore the error as we use the retry for validation
err := retryFunc()
if err == nil {
return nil