Reduce go unittest time cost (#8556)

Signed-off-by: yhmo <yihua.mo@zilliz.com>
This commit is contained in:
groot 2021-09-26 12:56:07 +08:00 committed by GitHub
parent 14e6b39d54
commit a20a9c71e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -151,7 +151,7 @@ func TestWatchQueryChannel_ClearEtcdInfoAfterAssignedNodeDown(t *testing.T) {
}
queryCoord.scheduler.Enqueue([]task{testTask})
time.Sleep(time.Second)
time.Sleep(100 * time.Millisecond)
queryCoord.cluster.stopNode(nodeID)
for {
newActiveTaskIDKeys, _, err := queryCoord.scheduler.client.LoadWithPrefix(activeTaskPrefix)

View File

@ -160,7 +160,7 @@ func TestSearch_Search(t *testing.T) {
err = sendSearchRequest(node.queryNodeLoopCtx, DIM)
assert.NoError(t, err)
time.Sleep(1 * time.Second)
time.Sleep(100 * time.Millisecond)
err = node.Stop()
assert.NoError(t, err)
@ -206,7 +206,7 @@ func TestSearch_SearchMultiSegments(t *testing.T) {
err = sendSearchRequest(node.queryNodeLoopCtx, DIM)
assert.NoError(t, err)
time.Sleep(1 * time.Second)
time.Sleep(100 * time.Millisecond)
err = node.Stop()
assert.NoError(t, err)

View File

@ -88,7 +88,7 @@ func TestProxyManager(t *testing.T) {
_, err = cli.Delete(ctx, k1)
assert.Nil(t, err)
time.Sleep(time.Second)
time.Sleep(100 * time.Millisecond)
pm.Stop()
time.Sleep(time.Second)
time.Sleep(100 * time.Millisecond)
}