Skip to content

Commit

Permalink
Fix the typo error for the WithReleasePartitionMsgBase option
Browse files Browse the repository at this point in the history
Signed-off-by: SimFG <[email protected]>
  • Loading branch information
SimFG committed Nov 14, 2023
1 parent 17be3e5 commit 28c392d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions client/options_msg_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ func WithLoadPartitionsMsgBase(msgBase *commonpb.MsgBase) LoadPartitionsOption {
}
}

// Deprecated: use WithReleaseCollectionMsgBase instead
func WithReleasePartitionMsgBase(msgBase *commonpb.MsgBase) ReleasePartitionsOption {
return WithReleasePartitionsMsgBase(msgBase)

Check warning on line 76 in client/options_msg_base.go

View check run for this annotation

Codecov / codecov/patch

client/options_msg_base.go#L76

Added line #L76 was not covered by tests
}

func WithReleasePartitionsMsgBase(msgBase *commonpb.MsgBase) ReleasePartitionsOption {
return func(req *milvuspb.ReleasePartitionsRequest) {
req.Base = msgBase
}
Expand Down
2 changes: 1 addition & 1 deletion client/partition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 28c392d

Please sign in to comment.