mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-30 06:51:30 +02:00
Fix small timeout causing test flake (#5436)
This commit is contained in:
parent
396c35b6b4
commit
b674d5c19d
1 changed files with 3 additions and 7 deletions
|
@ -145,13 +145,9 @@ func TestSpanObserver(t *testing.T) {
|
||||||
|
|
||||||
obs.Observe(Span(1).ID())
|
obs.Observe(Span(1).ID())
|
||||||
|
|
||||||
startTime := time.Now()
|
assert.Eventually(t, func() bool {
|
||||||
for waitersExited.Load() != 10 {
|
return waitersExited.Load() == 10
|
||||||
if time.Since(startTime) > 1*time.Millisecond {
|
}, 10*time.Millisecond, 1*time.Millisecond)
|
||||||
t.Fatal("timed out")
|
|
||||||
}
|
|
||||||
runtime.Gosched()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue