Add ut for CreateAlias when ctx is short (#12485)

Signed-off-by: dragondriver <jiquan.long@zilliz.com>
pull/12480/head
dragondriver 2021-12-01 10:13:34 +08:00 committed by GitHub
parent e813867652
commit aa154e023c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -2429,6 +2429,14 @@ func TestProxy(t *testing.T) {
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.Status.ErrorCode) assert.NotEqual(t, commonpb.ErrorCode_Success, resp.Status.ErrorCode)
}) })
wg.Add(1)
t.Run("CreateAlias fail, timeout", func(t *testing.T) {
defer wg.Done()
resp, err := proxy.CreateAlias(shortCtx, &milvuspb.CreateAliasRequest{})
assert.NoError(t, err)
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.ErrorCode)
})
wg.Wait() wg.Wait()
cancel() cancel()
} }