From cecc6ef591d8f70fb5b15659819858aba73d98a7 Mon Sep 17 00:00:00 2001 From: Congqi Xia Date: Tue, 10 Dec 2024 14:40:43 +0800 Subject: [PATCH] fix: Set show partition in-memory & fix case Related to #374 - Set show partition request in-memory req type - Fix test case logic Signed-off-by: Congqi Xia --- client/partition.go | 1 + test/testcases/load_release_test.go | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/partition.go b/client/partition.go index 30126ecd..9c4faeb7 100644 --- a/client/partition.go +++ b/client/partition.go @@ -92,6 +92,7 @@ func (c *GrpcClient) ShowPartitions(ctx context.Context, collName string) ([]*en req := &milvuspb.ShowPartitionsRequest{ DbName: "", // reserved CollectionName: collName, + Type: milvuspb.ShowType_InMemory, } resp, err := c.Service.ShowPartitions(ctx, req) if err != nil { diff --git a/test/testcases/load_release_test.go b/test/testcases/load_release_test.go index 61c4a2d2..27c94c83 100644 --- a/test/testcases/load_release_test.go +++ b/test/testcases/load_release_test.go @@ -297,7 +297,6 @@ func TestLoadPartitionsRepeatedly(t *testing.T) { // test load partitions async func TestLoadPartitionsAsync(t *testing.T) { - t.Skipf("Issue: https://github.com/milvus-io/milvus-sdk-go/issues/374") ctx := createContext(t, time.Second*common.DefaultTimeout) // connect mc := createMilvusClient(ctx, t) @@ -324,7 +323,7 @@ func TestLoadPartitionsAsync(t *testing.T) { for _, p := range partitions { log.Printf("id: %d, name: %s, loaded %t", p.ID, p.Name, p.Loaded) if p.Name == partitionName && p.Loaded { - break + return } } } else {