Skip to content

Commit

Permalink
testing: improve e2e test bootstrapping (#3690)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsachiherman committed Feb 3, 2025
1 parent a1aff06 commit 9755e8a
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions tests/fixture/e2e/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap"

"github.com/ava-labs/avalanchego/api/info"
"github.com/ava-labs/avalanchego/config"
"github.com/ava-labs/avalanchego/tests"
"github.com/ava-labs/avalanchego/tests/fixture/tmpnet"
Expand Down Expand Up @@ -143,25 +142,6 @@ func NewTestEnvironment(tc tests.TestContext, flagVars *FlagVars, desiredNetwork
flagVars.StartNetwork(),
flagVars.ReuseNetwork(),
)

// Wait for chains to have bootstrapped on all nodes
tc.Eventually(func() bool {
for _, subnet := range network.Subnets {
for _, validatorID := range subnet.ValidatorIDs {
uri, err := network.GetURIForNodeID(validatorID)
require.NoError(err)
infoClient := info.NewClient(uri)
for _, chain := range subnet.Chains {
isBootstrapped, err := infoClient.IsBootstrapped(tc.DefaultContext(), chain.ChainID.String())
// Ignore errors since a chain id that is not yet known will result in a recoverable error.
if err != nil || !isBootstrapped {
return false
}
}
}
}
return true
}, DefaultTimeout, DefaultPollingInterval, "failed to see all chains bootstrap before timeout")
}

if flagVars.StartNetwork() {
Expand Down

0 comments on commit 9755e8a

Please sign in to comment.