From 28c392dbb133676130ef93b17b1304f175cdc2a6 Mon Sep 17 00:00:00 2001 From: SimFG Date: Tue, 14 Nov 2023 11:43:27 +0800 Subject: [PATCH] Fix the typo error for the WithReleasePartitionMsgBase option Signed-off-by: SimFG --- client/options_msg_base.go | 5 +++++ client/partition_test.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/client/options_msg_base.go b/client/options_msg_base.go index a8c6013f..cafc4434 100644 --- a/client/options_msg_base.go +++ b/client/options_msg_base.go @@ -71,7 +71,12 @@ func WithLoadPartitionsMsgBase(msgBase *commonpb.MsgBase) LoadPartitionsOption { } } +// Deprecated: use WithReleaseCollectionMsgBase instead func WithReleasePartitionMsgBase(msgBase *commonpb.MsgBase) ReleasePartitionsOption { + return WithReleasePartitionsMsgBase(msgBase) +} + +func WithReleasePartitionsMsgBase(msgBase *commonpb.MsgBase) ReleasePartitionsOption { return func(req *milvuspb.ReleasePartitionsRequest) { req.Base = msgBase } diff --git a/client/partition_test.go b/client/partition_test.go index 685472b2..588eb427 100644 --- a/client/partition_test.go +++ b/client/partition_test.go @@ -188,7 +188,7 @@ func TestGrpcClientReleasePartitions(t *testing.T) { }) defer mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, "testPart")) - assert.Nil(t, c.ReleasePartitions(ctx, testCollectionName, parts, WithReleasePartitionMsgBase(&commonpb.MsgBase{}))) + assert.Nil(t, c.ReleasePartitions(ctx, testCollectionName, parts, WithReleasePartitionsMsgBase(&commonpb.MsgBase{}))) } func TestGrpcShowPartitions(t *testing.T) {