Fix close10000 ut has chances to fail (#12740)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/12693/head
congqixia 2021-12-06 09:59:35 +08:00 committed by GitHub
parent 0f5776e5fb
commit 58c5b6093d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ func TestMergedTimeTicker_close10000(t *testing.T) {
mt.close() mt.close()
}(mt) }(mt)
} }
tm := time.NewTimer(time.Millisecond * 20) tm := time.NewTimer(10 * time.Second)
done := make(chan struct{}) done := make(chan struct{})
go func() { go func() {
wg.Wait() wg.Wait()
@ -52,7 +52,7 @@ func TestMergedTimeTicker_close10000(t *testing.T) {
}() }()
select { select {
case <-tm.C: case <-tm.C:
t.FailNow() t.Fatal("wait all timer close, timeout")
case <-done: case <-done:
} }
} }