Add ut for CreateAlias when dd queue is full (#12484)

Signed-off-by: dragondriver <jiquan.long@zilliz.com>
This commit is contained in:
dragondriver 2021-12-01 15:36:03 +08:00 committed by GitHub
parent 1b6b2948fd
commit 05e210e83b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2177,6 +2177,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, dd queue full", func(t *testing.T) {
defer wg.Done()
resp, err := proxy.CreateAlias(ctx, &milvuspb.CreateAliasRequest{})
assert.NoError(t, err)
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.ErrorCode)
})
proxy.sched.ddQueue.setMaxTaskNum(ddParallel) proxy.sched.ddQueue.setMaxTaskNum(ddParallel)
dmParallelism := proxy.sched.dmQueue.getMaxTaskNum() dmParallelism := proxy.sched.dmQueue.getMaxTaskNum()