Skip to content

Commit c7dded0

Browse files
committed
Apply Eclesio's fix suggestions
1 parent 3beef6f commit c7dded0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/utils/gossamer_utils.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ func InitializeAndStartNodes(t *testing.T, num int, genesis, config string) (
320320

321321
for i := 0; i < num; i++ {
322322
go func(i int) {
323+
defer wg.Done()
323324
name := strconv.Itoa(i)
324325
if i < len(KeyList) {
325326
name = KeyList[i]
@@ -337,7 +338,6 @@ func InitializeAndStartNodes(t *testing.T, num int, genesis, config string) (
337338
nodesMutex.Lock()
338339
nodes = append(nodes, node)
339340
nodesMutex.Unlock()
340-
wg.Done()
341341
}(i)
342342
}
343343

@@ -361,6 +361,7 @@ func InitializeAndStartNodesWebsocket(t *testing.T, num int, genesis, config str
361361

362362
for i := 0; i < num; i++ {
363363
go func(i int) {
364+
defer wg.Done()
364365
name := strconv.Itoa(i)
365366
if i < len(KeyList) {
366367
name = KeyList[i]
@@ -378,8 +379,6 @@ func InitializeAndStartNodesWebsocket(t *testing.T, num int, genesis, config str
378379
nodesMutex.Lock()
379380
nodes = append(nodes, node)
380381
nodesMutex.Unlock()
381-
382-
wg.Done()
383382
}(i)
384383
}
385384

0 commit comments

Comments
 (0)