Skip to content

Commit

Permalink
chore(tests): wait a block period prior quering for upgrade proposal (#…
Browse files Browse the repository at this point in the history
…1894)

Signed-off-by: Artur Troian <troian.ap@gmail.com>
  • Loading branch information
troian committed Sep 18, 2023
1 parent ae6a330 commit 9dfbfd8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/upgrade/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"bufio"
"context"
"encoding/json"
"errors"
"flag"
"fmt"
"io"
Expand Down Expand Up @@ -698,6 +699,14 @@ func (l *upgradeTest) submitUpgradeProposal() error {
return err
}

timeout, tCancel := context.WithTimeout(l.ctx, 7*time.Second)
defer tCancel()

<-timeout.Done()
if err := timeout.Err(); err != nil && !errors.Is(err, context.DeadlineExceeded) {
return err
}

cmdRes, err = l.cmdr.execute(l.ctx, "query gov proposals")
if err != nil {
l.t.Logf("executing cmd failed: %s\n", string(cmdRes))
Expand Down

0 comments on commit 9dfbfd8

Please sign in to comment.