diff --git a/network/dataStructures/waitingRounds_test.go b/network/dataStructures/waitingRounds_test.go index 9db1a8fb1e2ea6d6d312fc59968d682db5950acf..a55b93c1444592cd8fe3eadaff1068e7a307b6d0 100644 --- a/network/dataStructures/waitingRounds_test.go +++ b/network/dataStructures/waitingRounds_test.go @@ -269,15 +269,12 @@ func TestWaitingRounds_GetUpcomingRealtime_GetFurthest(t *testing.T) { // Populate the waiting rounds for i, round := range expectedRounds { - localIndex := i - go func(round *Round, index int) { - time.Sleep(30 * time.Millisecond) - err := testutils.SignRoundInfoRsa(round.info, t) - if err != nil { - t.Errorf("Failed to sign round info #%d: %+v", localIndex, err) - } - testWR.Insert(round) - }(round, localIndex) + time.Sleep(30 * time.Millisecond) + err := testutils.SignRoundInfoRsa(round.info, t) + if err != nil { + t.Errorf("Failed to sign round info #%d: %+v", i, err) + } + testWR.Insert(round) } // Attempt to get the furthest round in the queue diff --git a/network/instance_test.go b/network/instance_test.go index b6fab285f60daf53c7568a369cc79511d8b8f52b..12ad768da67c65aed9ee83a1a2db69cd0cba58c4 100644 --- a/network/instance_test.go +++ b/network/instance_test.go @@ -919,7 +919,7 @@ func TestInstance_NodeEventModel(t *testing.T) { timeout := 5 for { counterVal := atomic.LoadUint32(&counter) - totalNodeGateways := uint32(len(newNdf.Nodes)+len(newNdf.Gateways)) + totalNodeGateways := uint32(len(newNdf.Nodes) + len(newNdf.Gateways)) if counterVal == totalNodeGateways { break } else {