Make DescribeCollection return collectionName (#19000)

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
bigsheeper 2022-09-02 19:20:59 +08:00 committed by GitHub
parent 8403117341
commit 8a45381e53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -529,6 +529,7 @@ func (dct *describeCollectionTask) Execute(ctx context.Context) error {
CollectionID: 0, CollectionID: 0,
VirtualChannelNames: nil, VirtualChannelNames: nil,
PhysicalChannelNames: nil, PhysicalChannelNames: nil,
CollectionName: dct.GetCollectionName(),
} }
result, err := dct.rootCoord.DescribeCollection(ctx, dct.DescribeCollectionRequest) result, err := dct.rootCoord.DescribeCollection(ctx, dct.DescribeCollectionRequest)

View File

@ -1031,7 +1031,7 @@ func TestDescribeCollectionTask_ShardsNum1(t *testing.T) {
assert.Nil(t, err) assert.Nil(t, err)
assert.Equal(t, commonpb.ErrorCode_Success, task.result.Status.ErrorCode) assert.Equal(t, commonpb.ErrorCode_Success, task.result.Status.ErrorCode)
assert.Equal(t, shardsNum, task.result.ShardsNum) assert.Equal(t, shardsNum, task.result.ShardsNum)
assert.Equal(t, collectionName, task.result.GetCollectionName())
} }
func TestDescribeCollectionTask_ShardsNum2(t *testing.T) { func TestDescribeCollectionTask_ShardsNum2(t *testing.T) {
@ -1097,6 +1097,7 @@ func TestDescribeCollectionTask_ShardsNum2(t *testing.T) {
assert.Nil(t, err) assert.Nil(t, err)
assert.Equal(t, commonpb.ErrorCode_Success, task.result.Status.ErrorCode) assert.Equal(t, commonpb.ErrorCode_Success, task.result.Status.ErrorCode)
assert.Equal(t, common.DefaultShardsNum, task.result.ShardsNum) assert.Equal(t, common.DefaultShardsNum, task.result.ShardsNum)
assert.Equal(t, collectionName, task.result.GetCollectionName())
rc.Stop() rc.Stop()
} }