From 737350ec0491392bf46ba30221c0c271e852e08e Mon Sep 17 00:00:00 2001 From: ptrus Date: Tue, 12 Jan 2021 11:40:56 +0100 Subject: [PATCH] go/e2e/governance-upgrade: wait for compute nodes to be ready --- .changelog/3618.internal.md | 1 + .../scenario/e2e/runtime/governance_upgrade.go | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .changelog/3618.internal.md diff --git a/.changelog/3618.internal.md b/.changelog/3618.internal.md new file mode 100644 index 00000000000..a650c1cb985 --- /dev/null +++ b/.changelog/3618.internal.md @@ -0,0 +1 @@ +go/e2e/governance-upgrade: wait for compute nodes to be ready diff --git a/go/oasis-test-runner/scenario/e2e/runtime/governance_upgrade.go b/go/oasis-test-runner/scenario/e2e/runtime/governance_upgrade.go index 085e18f3cfa..169bfd24fd0 100644 --- a/go/oasis-test-runner/scenario/e2e/runtime/governance_upgrade.go +++ b/go/oasis-test-runner/scenario/e2e/runtime/governance_upgrade.go @@ -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" @@ -41,7 +40,7 @@ var ( type governanceConsensusUpgradeImpl struct { runtimeImpl - currentEpoch epoch.EpochTime + currentEpoch epochtime.EpochTime entityNonce uint64 correctBinaryHash bool @@ -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")