summaryrefslogtreecommitdiffhomepage
path: root/pkg/gate
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gate')
-rw-r--r--pkg/gate/gate_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/gate/gate_test.go b/pkg/gate/gate_test.go
index 850693df8..316015e06 100644
--- a/pkg/gate/gate_test.go
+++ b/pkg/gate/gate_test.go
@@ -15,6 +15,7 @@
package gate_test
import (
+ "runtime"
"testing"
"time"
@@ -165,6 +166,8 @@ func worker(g *gate.Gate, done *sync.WaitGroup) {
if !g.Enter() {
break
}
+ // Golang before v1.14 doesn't preempt busyloops.
+ runtime.Gosched()
g.Leave()
}
done.Done()