Skip to content
Snippets Groups Projects
Commit 9f38710c authored by Josh Brooks's avatar Josh Brooks
Browse files

Fix further racey issue in tests

parent 3b95afbc
No related branches found
No related tags found
3 merge requests!58Revert "Modify waiting lock",!9Release,!6Fix racy test
...@@ -269,15 +269,12 @@ func TestWaitingRounds_GetUpcomingRealtime_GetFurthest(t *testing.T) { ...@@ -269,15 +269,12 @@ func TestWaitingRounds_GetUpcomingRealtime_GetFurthest(t *testing.T) {
// Populate the waiting rounds // Populate the waiting rounds
for i, round := range expectedRounds { for i, round := range expectedRounds {
localIndex := i
go func(round *Round, index int) {
time.Sleep(30 * time.Millisecond) time.Sleep(30 * time.Millisecond)
err := testutils.SignRoundInfoRsa(round.info, t) err := testutils.SignRoundInfoRsa(round.info, t)
if err != nil { if err != nil {
t.Errorf("Failed to sign round info #%d: %+v", localIndex, err) t.Errorf("Failed to sign round info #%d: %+v", i, err)
} }
testWR.Insert(round) testWR.Insert(round)
}(round, localIndex)
} }
// Attempt to get the furthest round in the queue // Attempt to get the furthest round in the queue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment