Skip to content

Commit

Permalink
use StartNode, not StartNodes
Browse files Browse the repository at this point in the history
  • Loading branch information
feuGeneA committed Jun 26, 2024
1 parent 5eb32de commit 3500bcc
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/local/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,15 @@ func (n *LocalNetwork) AddSubnetValidators(ctx context.Context, subnetID ids.ID,
Expect(err).Should(BeNil())

nodes := subnetEvmTestUtils.NewTmpnetNodes(int(count))
err = n.tmpnet.StartNodes(ctx, os.Stdout, nodes...)
Expect(err).Should(BeNil())

ctx, _ = context.WithTimeout(ctx, 30*time.Second)

Check failure on line 474 in tests/local/network.go

View workflow job for this annotation

GitHub Actions / golangci

lostcancel: the cancel function returned by context.WithTimeout should be called, not discarded, to avoid a context leak (govet)
for _, node := range nodes {
err = n.tmpnet.StartNode(ctx, os.Stdout, node)
Expect(err).Should(BeNil())
}
for _, node := range nodes {
err = tmpnet.WaitForHealthy(ctx, node)
Expect(err).Should(BeNil())
}
err = subnet.AddValidators(
ctx,
os.Stdout,
Expand Down

0 comments on commit 3500bcc

Please sign in to comment.