Skip to content

Commit

Permalink
Merge pull request #3618 from oasisprotocol/ptrus/fix/e2e-governance-…
Browse files Browse the repository at this point in the history
…upgrade

go/e2e/governance-upgrade: wait for compute nodes to be ready
  • Loading branch information
ptrus authored Jan 12, 2021
2 parents 37c096d + 737350e commit 660af9d
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 660af9d

Please sign in to comment.