Skip to content

Commit

Permalink
bump up and unify timeout values
Browse files Browse the repository at this point in the history
addresses review comment ava-labs/icm-contracts#401 (comment)
  • Loading branch information
feuGeneA committed Jul 10, 2024
1 parent b5cfb74 commit 59d5d41
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/local/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ const (
"internal-debug","internal-account","internal-personal",
"debug","debug-tracer","debug-file-tracer","debug-handler"]
}`

timeout = 60 * time.Second
)

func NewLocalNetwork(warpGenesisFile string) *LocalNetwork {
Expand Down Expand Up @@ -111,7 +113,7 @@ func NewLocalNetwork(warpGenesisFile string) *LocalNetwork {
avalancheGoBuildPath, ok := os.LookupEnv("AVALANCHEGO_BUILD_PATH")
Expect(ok).Should(Equal(true))

ctxWithTimeout, cancelBootstrap := context.WithTimeout(ctx, time.Minute*5)
ctxWithTimeout, cancelBootstrap := context.WithTimeout(ctx, timeout)
err = tmpnet.BootstrapNewNetwork(
ctxWithTimeout,
os.Stdout,
Expand Down Expand Up @@ -470,7 +472,7 @@ func (n *LocalNetwork) AddSubnetValidators(ctx context.Context, subnetID ids.ID,
apiURI, err := n.tmpnet.GetURIForNodeID(subnet.ValidatorIDs[0])
Expect(err).Should(BeNil())

ctx, cancel := context.WithTimeout(ctx, 30*time.Second)
ctx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()
err = subnet.AddValidators(
ctx,
Expand Down Expand Up @@ -517,7 +519,7 @@ func (n *LocalNetwork) RestartNodes(ctx context.Context, nodeIDs []ids.NodeID) {
}

for _, node := range nodes {
ctx, cancel := context.WithTimeout(ctx, 30*time.Second)
ctx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()
err := node.SaveAPIPort()
Expect(err).Should(BeNil())
Expand Down

0 comments on commit 59d5d41

Please sign in to comment.