Merge pull request #13380 from machine424/fixes

fix(discovery tests): allow requireUpdate util to timeout in discovery/file…
This commit is contained in:
Bryan Boreham 2024-01-18 14:11:01 +00:00 committed by GitHub
commit b9952ff571
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -193,9 +193,10 @@ func (t *testRunner) targets() []*targetgroup.Group {
func (t *testRunner) requireUpdate(ref time.Time, expected []*targetgroup.Group) {
t.Helper()
timeout := time.After(defaultWait)
for {
select {
case <-time.After(defaultWait):
case <-timeout:
t.Fatalf("Expected update but got none")
return
case <-time.After(defaultWait / 10):