mirror of https://github.com/milvus-io/milvus.git
Fix data race in test (#15690)
Signed-off-by: sunby <bingyi.sun@zilliz.com> Co-authored-by: sunby <bingyi.sun@zilliz.com>pull/15694/head v2.0.1
parent
f2017043a3
commit
ce9662c140
|
@ -910,11 +910,18 @@ func Test_RepeatedLoadDifferentPartitions(t *testing.T) {
|
|||
status, err := queryCoord.LoadPartitions(ctx, loadPartitionReq)
|
||||
assert.Equal(t, commonpb.ErrorCode_Success, status.ErrorCode)
|
||||
assert.Nil(t, err)
|
||||
waitLoadPartitionDone(ctx, queryCoord, defaultCollectionID, []UniqueID{defaultPartitionID})
|
||||
assert.Nil(t, waitLoadPartitionDone(ctx, queryCoord, defaultCollectionID, []UniqueID{defaultPartitionID}))
|
||||
|
||||
// second load defaultPartitionID+1
|
||||
loadPartitionReq.PartitionIDs = []UniqueID{defaultPartitionID + 1}
|
||||
status, err = queryCoord.LoadPartitions(ctx, loadPartitionReq)
|
||||
failLoadRequest := &querypb.LoadPartitionsRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_LoadPartitions,
|
||||
},
|
||||
CollectionID: defaultCollectionID,
|
||||
PartitionIDs: []UniqueID{defaultPartitionID + 1},
|
||||
Schema: genDefaultCollectionSchema(false),
|
||||
}
|
||||
status, err = queryCoord.LoadPartitions(ctx, failLoadRequest)
|
||||
assert.Equal(t, commonpb.ErrorCode_UnexpectedError, status.ErrorCode)
|
||||
assert.Nil(t, err)
|
||||
|
||||
|
|
Loading…
Reference in New Issue