mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-29 14:39:40 +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())
|
||||
|
||||
startTime := time.Now()
|
||||
for waitersExited.Load() != 10 {
|
||||
if time.Since(startTime) > 1*time.Millisecond {
|
||||
t.Fatal("timed out")
|
||||
}
|
||||
runtime.Gosched()
|
||||
}
|
||||
assert.Eventually(t, func() bool {
|
||||
return waitersExited.Load() == 10
|
||||
}, 10*time.Millisecond, 1*time.Millisecond)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue