mirror of https://github.com/milvus-io/milvus.git
Fix close10000 ut has chances to fail (#12740)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/12693/head
parent
0f5776e5fb
commit
58c5b6093d
|
@ -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:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue