Skip to content

Commit

Permalink
go/e2e/governance-upgrade: wait for compute nodes to be ready
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrus committed Jan 12, 2021
1 parent 37c096d commit 737350e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .changelog/3618.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
go/e2e/governance-upgrade: wait for compute nodes to be ready
11 changes: 9 additions & 2 deletions go/oasis-test-runner/scenario/e2e/runtime/governance_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/oasisprotocol/oasis-core/go/common/quantity"
consensus "github.com/oasisprotocol/oasis-core/go/consensus/api"
"github.com/oasisprotocol/oasis-core/go/consensus/api/transaction"
epoch "github.com/oasisprotocol/oasis-core/go/epochtime/api"
epochtime "github.com/oasisprotocol/oasis-core/go/epochtime/api"
"github.com/oasisprotocol/oasis-core/go/governance/api"
"github.com/oasisprotocol/oasis-core/go/oasis-test-runner/env"
Expand Down Expand Up @@ -41,7 +40,7 @@ var (
type governanceConsensusUpgradeImpl struct {
runtimeImpl

currentEpoch epoch.EpochTime
currentEpoch epochtime.EpochTime
entityNonce uint64

correctBinaryHash bool
Expand Down Expand Up @@ -479,6 +478,14 @@ func (sc *governanceConsensusUpgradeImpl) Run(childEnv *env.Env) error { // noli
if err != nil {
return fmt.Errorf("can't get registered test entity: %w", err)
}

// Wait for compute nodes to be ready.
sc.Logger.Info("waiting for compute nodes to be ready")
for _, n := range sc.Net.ComputeWorkers() {
if err = n.WaitReady(sc.ctx); err != nil {
return fmt.Errorf("failed to wait for a compute node: %w", err)
}
}
}

sc.Logger.Info("final epoch transition")
Expand Down

0 comments on commit 737350e

Please sign in to comment.