Skip to content

Commit

Permalink
backport of commit ccaedec (#17136)
Browse files Browse the repository at this point in the history
This pull request was automerged via backport-assistant
  • Loading branch information
hc-github-team-nomad-core authored May 10, 2023
1 parent 35fc785 commit d98cc3c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion helper/broker/notify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestGenericNotifier(t *testing.T) {
}
timeoutWG.Wait()

// Test that all subscribers recieve an update when a single notification
// Test that all subscribers receive an update when a single notification
// is sent.
var notifiedWG sync.WaitGroup

Expand All @@ -50,6 +50,10 @@ func TestGenericNotifier(t *testing.T) {
}(&notifiedWG)
}

// Ensure the routines have had time to start before sending the notify
// signal, otherwise the test is a flake.
time.Sleep(500 * time.Millisecond)

notifier.Notify("we got an update and not a timeout")
notifiedWG.Wait()
}

0 comments on commit d98cc3c

Please sign in to comment.