@@ -19,6 +19,22 @@ import (
1919 "github.com/onsi/gomega"
2020)
2121
22+ const (
23+ // Timeout to boot the AvalancheGo node
24+ bootAvalancheNodeTimeout = 5 * time .Minute
25+
26+ // Timeout for the health API to check the AvalancheGo is ready
27+ healthCheckTimeout = 5 * time .Second
28+ )
29+
30+ // At boot time subnets are created, one for each test suite. This global
31+ // variable has all the subnets IDs that can be used.
32+ //
33+ // One process creates the AvalancheGo node and all the subnets, and these
34+ // subnets IDs are passed to all other processes and stored in this global
35+ // variable
36+ var BlockchainIDs map [string ]string
37+
2238// RunCommand starts the command [bin] with the given [args] and returns the command to the caller
2339// TODO cmd package mentions we can do this more efficiently with cmd.NewCmdOptions rather than looping
2440// and calling Status().
@@ -60,32 +76,18 @@ func RegisterPingTest() {
6076 })
6177}
6278
63- // At boot time subnets are created, one for each test suite. This global
64- // variable has all the subnets IDs that can be used.
65- //
66- // One process creates the AvalancheGo node and all the subnets, and these
67- // subnets IDs are passed to all other processes and stored in this global
68- // variable
69- var BlockchainIDs map [string ]string
70-
71- // Timeout to boot the AvalancheGo node
72- var bootAvalancheNodeTimeout = 5 * time .Minute
73-
74- // Timeout for the health API to check the AvalancheGo is ready
75- var healthCheckTimeout = 5 * time .Second
76-
7779func RegisterNodeRun () {
7880 // Keep track of the AvalancheGo external bash script, it is null for most
7981 // processes except the first process that starts AvalancheGo
8082 var startCmd * cmd.Cmd
8183
82- // Our test suite runs in a separated processes, ginkgo hasI
83- // SynchronizedBeforeSuite() which is promised to run once, and its output is
84- // passed over to each worker.
84+ // Our test suite runs in separate processes, ginkgo has
85+ // SynchronizedBeforeSuite() which runs once, and its return value is passed
86+ // over to each worker.
8587 //
86- // In here an AvalancheGo node instance is started, and subnets are created for
87- // each test case. Each test case has its own subnet, therefore all tests can
88- // run in parallel without any issue.
88+ // Here an AvalancheGo node instance is started, and subnets are created for
89+ // each test case. Each test case has its own subnet, therefore all tests
90+ // can run in parallel without any issue.
8991 //
9092 // This function also compiles all the solidity contracts
9193 var _ = ginkgo .SynchronizedBeforeSuite (func () []byte {
0 commit comments