Skip to content

Commit 786170e

Browse files
fix: copilot review
1 parent 2596d18 commit 786170e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/dynamic/search_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ func assertNoGoroutineLeak(t *testing.T, before int) {
255255
t.Helper()
256256
deadline := time.Now().Add(2 * time.Second)
257257
for runtime.NumGoroutine() > before && time.Now().Before(deadline) {
258-
runtime.Gosched()
258+
time.Sleep(10 * time.Millisecond)
259259
}
260260
if after := runtime.NumGoroutine(); after > before {
261261
t.Errorf("goroutine leak: started with %d, ended with %d", before, after)

0 commit comments

Comments
 (0)