TestContextWatcherStress: reduce sleep counts

This commit is contained in:
Nicola Murino 2023-05-28 19:59:54 +02:00 committed by Jack Christensen
parent c861bce438
commit fb47e1abbb

View File

@ -104,7 +104,9 @@ func TestContextWatcherStress(t *testing.T) {
}
// Without time.Sleep, cw.Unwatch will almost always run before the cancel func which means cancel will never happen. This gives us a better mix.
if i%3 == 0 {
if i%333 == 0 {
// on Windows Sleep takes more time than expected so we try to get here less frequently to avoid
// the CI takes a long time
time.Sleep(time.Nanosecond)
}