Răsfoiți Sursa

modify testcases and verify highlevel bug (#592)

Signed-off-by: yongpengli-z <yongpeng.li@zilliz.com>
yongpengli-z 1 an în urmă
părinte
comite
558b934399

+ 46 - 11
tests/milvustest/src/main/java/com/zilliz/milvustest/common/CommonFunction.java

@@ -4,8 +4,6 @@ import com.alibaba.fastjson.JSONObject;
 import com.zilliz.milvustest.entity.FileBody;
 import com.zilliz.milvustest.entity.MilvusEntity;
 import com.zilliz.milvustest.util.MathUtil;
-import com.zilliz.milvustest.util.PropertyFilesUtil;
-import io.milvus.client.MilvusServiceClient;
 import io.milvus.grpc.DataType;
 import io.milvus.param.*;
 import io.milvus.param.alias.CreateAliasParam;
@@ -18,8 +16,6 @@ import io.milvus.param.partition.CreatePartitionParam;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
-
-import javax.swing.text.FlowView;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -485,23 +481,33 @@ public class CommonFunction {
       case IVF_PQ:
         extraParm = "{\"nlist\":128, \"m\":16, \"nbits\":8}";
         break;
-      case ANNOY:
+/*      case ANNOY:
         extraParm = "{\"n_trees\":16}";
-        break;
+        break;*/
       case HNSW:
         extraParm = "{\"M\":16,\"efConstruction\":64}";
         break;
-      case RHNSW_FLAT:
+     /* case RHNSW_FLAT:
         extraParm = "{\"M\":16,\"efConstruction\":64}";
-        break;
-      case RHNSW_PQ:
+        break;*/
+/*      case RHNSW_PQ:
         extraParm = "{\"M\":16,\"efConstruction\":64, \"PQM\":16}";
         break;
       case RHNSW_SQ:
         extraParm = "{\"M\":16,\"efConstruction\":64}";
-        break;
+        break;*/
       case BIN_IVF_FLAT:
-        extraParm = "";
+        extraParm = "{\"nlist\": 128}";
+        break;
+      case SCANN:
+        extraParm="{\"nlist\":1024}";
+        break;
+      case GPU_IVF_FLAT:
+        extraParm="{\"nlist\": 64}";
+        break;
+      case GPU_IVF_PQ:
+        extraParm="{\"nlist\": 64, \"m\": 16, \"nbits\": 8}";
+        break;
       default:
         extraParm = "{\"nlist\":128}";
         break;
@@ -686,6 +692,35 @@ public class CommonFunction {
     }
     return jsonList;
   }
+  public static List<JSONObject> generateVarcharPKDataWithDynamicFiledRow(int num) {
+    List<JSONObject> jsonList = new ArrayList<>();
+    Random ran = new Random();
+    for (int i = 0; i < num; i++) {
+      JSONObject row = new JSONObject();
+      row.put("book_name",  "StringPK"+i);
+      row.put("word_count", (long) i);
+      row.put("extra_field", "String" + i);
+      row.put("extra_field2",  i);
+      // $innerJson
+      JSONObject innerJson = new JSONObject();
+      innerJson.put("int64", (long) i);
+      innerJson.put("varchar", "varchar"+i);
+      innerJson.put("int16", i);
+      innerJson.put("int32", i);
+      innerJson.put("int8", (short)i);
+      innerJson.put("float", (float)i);
+      innerJson.put("double", (double)i);
+      innerJson.put("bool", i % 2 == 0);
+      row.put("json_field", innerJson);
+      List<Float> vector = new ArrayList<>();
+      for (int k = 0; k < 128; ++k) {
+        vector.add(ran.nextFloat());
+      }
+      row.put("book_intro", vector);
+      jsonList.add(row);
+    }
+    return jsonList;
+  }
   public static void createIndexWithLoad(String collection, IndexType indexType, MetricType metricType, String fieldName){
     R<RpcStatus> rpcStatusR =
             milvusClient.createIndex(

+ 9 - 11
tests/milvustest/src/main/java/com/zilliz/milvustest/service/CustomerListener.java

@@ -27,7 +27,6 @@ public class CustomerListener extends TestListenerAdapter {
   @Override
   public void onStart(ITestContext iTestContext) {
     super.onStart(iTestContext);
-    startTime=System.currentTimeMillis();
     logger.info("===================={}测试开始====================", iTestContext.getName());
   }
 
@@ -40,7 +39,6 @@ public class CustomerListener extends TestListenerAdapter {
   public void onTestStart(ITestResult iTestResult) {
     super.onTestStart(iTestResult);
     logger.info("========{}测试开始========", iTestResult.getName());
-    totalCase++;
   }
 
   /**
@@ -52,7 +50,6 @@ public class CustomerListener extends TestListenerAdapter {
   public void onTestSuccess(ITestResult iTestResult) {
     super.onTestSuccess(iTestResult);
     logger.info("========{}测试通过========", iTestResult.getName());
-    passCase++;
   }
 
   /**
@@ -87,17 +84,18 @@ public class CustomerListener extends TestListenerAdapter {
   public void onFinish(ITestContext iTestContext) {
     super.onFinish(iTestContext);
     logger.info("===================={}测试结束====================", iTestContext.getName());
-    endTime=System.currentTimeMillis();
     // insert result into db
-    double passRate= passCase*100.00 / totalCase;
-    DecimalFormat df=new DecimalFormat("0.00");
-    int costTime= (int) ((endTime-startTime)/1000/60);
+    double passRate= iTestContext.getPassedTests().size()*100.00 / (iTestContext.getPassedTests().size()+iTestContext.getFailedTests().size()+iTestContext.getSkippedTests().size());
+    int costTime= (int) ((iTestContext.getEndDate().getTime()-iTestContext.getStartDate().getTime())/1000/60);
     String scenarioDesc=System.getProperty("ScenarioDesc") == null
             ? PropertyFilesUtil.getRunValue("ScenarioDesc")
             : System.getProperty("ScenarioDesc");
     String BuildId=System.getProperty("BuildId") == null
             ? PropertyFilesUtil.getRunValue("BuildId")
             : System.getProperty("BuildId");
+    String SDKBranch=System.getProperty("SDKBranch") == null
+            ? PropertyFilesUtil.getRunValue("SDKBranch")
+            : System.getProperty("SDKBranch");
     String jenkinsLink="https://qa-jenkins.milvus.io/job/Java-sdk-test-nightly/"+BuildId+"/";
     String githubLink="https://github.com/milvus-io/milvus-sdk-java/actions/workflows/java_sdk_ci_test.yaml";
     JSONObject request=new JSONObject();
@@ -105,19 +103,19 @@ public class CustomerListener extends TestListenerAdapter {
     request.put("Category","Function");
     request.put("Date", LocalDate.now().toString());
     request.put("Scenario",scenarioDesc);
-    request.put("Branch","Master");
+    request.put("Branch",SDKBranch);
     request.put("ImageName","2.2.0");
     request.put("SDK","java");
     request.put("MilvusMode","standalone");
-    request.put("MqMode","kafka");
+    request.put("MqMode","rocksMq");
     request.put("TestResult",passRate==100?"pass":"fail");
     request.put("PassRate", passRate);
     request.put("RunningTime", costTime);
     request.put("Link",scenarioDesc.equalsIgnoreCase("CI")?githubLink:jenkinsLink);
     String s = HttpClientUtils.doPostJson("http://qtp-server.zilliz.cc/results/insert",request.toJSONString());
     logger.info("insert result:"+s);
-   if(iTestContext.getFailedTests().size()>0){
-    System.exit(1);
+    if (iTestContext.getFailedTests().size()>0){
+      throw new RuntimeException("Case Failed "+iTestContext.getFailedTests().size());
     }
   }
 }

+ 8 - 24
tests/milvustest/src/test/java/com/zilliz/milvustest/index/CreateIndexTest.java

@@ -50,16 +50,13 @@ public class CreateIndexTest extends BaseTest {
   @DataProvider(name = "IndexTypes")
   public Object[][] provideIndexType() {
     return new Object[][] {
-      {IndexType.FLAT},
-      {IndexType.IVF_FLAT},
-      {IndexType.IVF_SQ8},
-      {IndexType.IVF_PQ},
-      {IndexType.HNSW},
-/*      {IndexType.ANNOY},
-      {IndexType.RHNSW_FLAT},
-      {IndexType.RHNSW_PQ},
-      {IndexType.RHNSW_SQ},*/
-      {IndexType.DISKANN}
+            {IndexType.IVF_FLAT},
+            {IndexType.IVF_SQ8},
+            {IndexType.IVF_PQ},
+            {IndexType.HNSW},
+            {IndexType.SCANN},
+            {IndexType.GPU_IVF_FLAT},
+            {IndexType.GPU_IVF_PQ}
     };
   }
 
@@ -77,10 +74,7 @@ public class CreateIndexTest extends BaseTest {
   public Object[][] providerBinaryMetricType() {
     return new Object[][] {
       {MetricType.HAMMING},
-      {MetricType.JACCARD},
-      {MetricType.SUBSTRUCTURE},
-      {MetricType.SUPERSTRUCTURE},
-      {MetricType.TANIMOTO}
+      {MetricType.JACCARD}
     };
   }
 
@@ -150,11 +144,6 @@ public class CreateIndexTest extends BaseTest {
   @Issue("https://github.com/milvus-io/milvus-sdk-java/issues/321")
   @Test(description = "Create index for collection Async", dataProvider = "BinaryIndex")
   public void createBinaryIndexAsync(IndexType indexType, MetricType metricType) {
-    if (indexType.equals(IndexType.BIN_IVF_FLAT)
-        && (metricType.equals(MetricType.SUBSTRUCTURE)
-            || metricType.equals(MetricType.SUPERSTRUCTURE))) {
-      return;
-    }
     R<RpcStatus> rpcStatusR =
         milvusClient.createIndex(
             CreateIndexParam.newBuilder()
@@ -180,11 +169,6 @@ public class CreateIndexTest extends BaseTest {
   @Issue("https://github.com/milvus-io/milvus-sdk-java/issues/321")
   @Test(description = "Create index for collection sync", dataProvider = "BinaryIndex")
   public void createBinaryIndexSync(IndexType indexType, MetricType metricType) {
-    if (indexType.equals(IndexType.BIN_IVF_FLAT)
-        && (metricType.equals(MetricType.SUBSTRUCTURE)
-            || metricType.equals(MetricType.SUPERSTRUCTURE))) {
-      return;
-    }
     R<RpcStatus> rpcStatusR =
         milvusClient.createIndex(
             CreateIndexParam.newBuilder()

+ 6 - 15
tests/milvustest/src/test/java/com/zilliz/milvustest/index/IndexLoadTest.java

@@ -44,15 +44,13 @@ public class IndexLoadTest extends BaseTest {
     @DataProvider(name = "IndexTypes")
     public Object[][] provideIndexType() {
         return new Object[][] {
-                {IndexType.FLAT},
                 {IndexType.IVF_FLAT},
                 {IndexType.IVF_SQ8},
                 {IndexType.IVF_PQ},
                 {IndexType.HNSW},
-              /*  {IndexType.ANNOY},
-                {IndexType.RHNSW_FLAT},
-                {IndexType.RHNSW_PQ},
-                {IndexType.RHNSW_SQ}*/
+                {IndexType.SCANN},
+                {IndexType.GPU_IVF_FLAT},
+                {IndexType.GPU_IVF_PQ}
         };
     }
 
@@ -71,10 +69,7 @@ public class IndexLoadTest extends BaseTest {
     public Object[][] providerBinaryMetricType() {
         return new Object[][] {
                 {MetricType.HAMMING},
-                {MetricType.JACCARD},
-                {MetricType.SUBSTRUCTURE},
-                {MetricType.SUPERSTRUCTURE},
-                {MetricType.TANIMOTO}
+                {MetricType.JACCARD}
         };
     }
 
@@ -160,13 +155,9 @@ public class IndexLoadTest extends BaseTest {
     }
 
     @Severity(SeverityLevel.NORMAL)
-    @Test(description = "Test create/drop index when collection is loaded for binary vector", dataProvider = "BinaryIndex",groups = {"Smoke"})
+    @Test(description = "Test create/drop index when collection is loaded for binary vector",
+            dataProvider = "BinaryIndex",groups = {"Smoke"})
     public void createIndexAfterLoadBinaryCollection(IndexType indexType, MetricType metricType) {
-        if (indexType.equals(IndexType.BIN_IVF_FLAT)
-                && (metricType.equals(MetricType.SUBSTRUCTURE)
-                || metricType.equals(MetricType.SUPERSTRUCTURE))) {
-            return;
-        }
         // 1. create index params
         CreateIndexParam createIndexParams = CreateIndexParam.newBuilder()
                 .withCollectionName(binaryCollection)

+ 1 - 1
tests/milvustest/src/test/java/com/zilliz/milvustest/insert/DeleteTest.java

@@ -20,7 +20,7 @@ import org.testng.annotations.Test;
 
 import java.util.List;
 
-@Epic("Index")
+@Epic("Insert")
 @Feature("Delete")
 public class DeleteTest extends BaseTest {
   public String commonCollection;

+ 1 - 1
tests/milvustest/src/test/java/com/zilliz/milvustest/insert/InsertAsyncTest.java

@@ -24,7 +24,7 @@ import java.util.List;
 import java.util.Random;
 import java.util.concurrent.ExecutionException;
 
-@Epic("Index")
+@Epic("Insert")
 @Feature("InsertAsyncT")
 public class InsertAsyncTest extends BaseTest {
   public String stringPKAndBinaryCollection;

+ 1 - 1
tests/milvustest/src/test/java/com/zilliz/milvustest/insert/InsertTest.java

@@ -30,7 +30,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
 
-@Epic("Index")
+@Epic("Insert")
 @Feature("Insert")
 public class InsertTest extends BaseTest {
   public String stringPKAndBinaryCollection;

+ 112 - 0
tests/milvustest/src/test/java/com/zilliz/milvustest/insert/UpsertTest.java

@@ -0,0 +1,112 @@
+package com.zilliz.milvustest.insert;
+
+import com.zilliz.milvustest.common.BaseTest;
+import com.zilliz.milvustest.common.CommonData;
+import com.zilliz.milvustest.common.CommonFunction;
+import com.zilliz.milvustest.util.MathUtil;
+import io.milvus.common.clientenum.ConsistencyLevelEnum;
+import io.milvus.grpc.MutationResult;
+import io.milvus.grpc.SearchResults;
+import io.milvus.param.MetricType;
+import io.milvus.param.R;
+import io.milvus.param.collection.LoadCollectionParam;
+import io.milvus.param.dml.InsertParam;
+import io.milvus.param.dml.SearchParam;
+import io.milvus.param.dml.UpsertParam;
+import io.milvus.response.SearchResultsWrapper;
+import io.qameta.allure.Epic;
+import io.qameta.allure.Feature;
+import io.qameta.allure.Severity;
+import io.qameta.allure.SeverityLevel;
+import org.testng.Assert;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+import java.util.*;
+
+/**
+ * @Author yongpeng.li
+ * @Date 2023/8/22 11:19
+ */
+@Epic("Insert")
+@Feature("UpsertTest")
+public class UpsertTest extends BaseTest {
+    @BeforeTest(alwaysRun = true)
+    public void insertDataIntoCollection() {
+        List<InsertParam.Field> fields = CommonFunction.generateData(2000);
+        R<MutationResult> mutationResultR =
+                milvusClient.insert(
+                        InsertParam.newBuilder()
+                                .withCollectionName(CommonData.defaultCollection)
+                                .withFields(fields)
+                                .build());
+    }
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "UpsertTest data into collection",groups = {"master"})
+    public void upsertDataIntoCollection() {
+        Random ran = new Random();
+        List<Long> book_id_array = new ArrayList<>();
+        List<Long> word_count_array = new ArrayList<>();
+        List<List<Float>> book_intro_array = new ArrayList<>();
+        for (long i = 0L; i < 10; ++i) {
+            book_id_array.add(i);
+            word_count_array.add(i + 20000);
+            List<Float> vector = new ArrayList<>();
+            for (int k = 0; k < 128; ++k) {
+                vector.add(ran.nextFloat());
+            }
+            book_intro_array.add(vector);
+        }
+        List<InsertParam.Field> fields = new ArrayList<>();
+        fields.add(new InsertParam.Field("book_id", book_id_array));
+        fields.add(new InsertParam.Field("word_count", word_count_array));
+        fields.add(new InsertParam.Field(CommonData.defaultVectorField, book_intro_array));
+        R<MutationResult> mutationResultR =
+                milvusClient.upsert(UpsertParam.newBuilder()
+                        .withCollectionName(CommonData.defaultCollection)
+                        .withFields(fields).build());
+        Assert.assertEquals(mutationResultR.getStatus().intValue(), 0);
+        Assert.assertEquals(mutationResultR.getData().getSuccIndexCount(), 10);
+        Assert.assertEquals(mutationResultR.getData().getDeleteCnt(), 10);
+    }
+
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "Search after upsert collection",groups = {"master"},dependsOnMethods = {"upsertDataIntoCollection"})
+    public void searchAfterUpsertCollection(){
+        //load
+        milvusClient.loadCollection(LoadCollectionParam.newBuilder()
+                .withCollectionName(CommonData.defaultCollection)
+                .withSyncLoad(true).build());
+        Integer SEARCH_K = 10; // TopK
+        String SEARCH_PARAM = "{\"nprobe\":10}";
+        List<String> search_output_fields = Collections.singletonList("word_count");
+        List<List<Float>> search_vectors = Collections.singletonList(Arrays.asList(MathUtil.generateFloat(128)));
+        SearchParam searchParam =
+                SearchParam.newBuilder()
+                        .withCollectionName(CommonData.defaultCollection)
+                        .withMetricType(MetricType.L2)
+                        .withOutFields(search_output_fields)
+                        .withTopK(SEARCH_K)
+                        .withVectors(search_vectors)
+                        .withVectorFieldName(CommonData.defaultVectorField)
+                        .withParams(SEARCH_PARAM)
+                        .withConsistencyLevel(ConsistencyLevelEnum.STRONG)
+                        .withExpr("book_id < 10")
+                        .build();
+        R<SearchResults> searchResultsR = milvusClient.search(searchParam);
+        Assert.assertEquals(searchResultsR.getStatus().intValue(), 0);
+        SearchResultsWrapper searchResultsWrapper =
+                new SearchResultsWrapper(searchResultsR.getData().getResults());
+        Assert.assertEquals(searchResultsWrapper.getFieldData("word_count", 0).size(), 10);
+        List<?> word_count = searchResultsWrapper.getFieldWrapper("word_count").getFieldData();
+        for (Object o : word_count) {
+            System.out.println(Integer.parseInt(o.toString()));
+            Assert.assertTrue(Integer.parseInt(o.toString())>=20000);
+        }
+    }
+
+
+
+}

+ 10 - 22
tests/milvustest/src/test/java/com/zilliz/milvustest/query/QueryAsyncTest.java

@@ -34,6 +34,7 @@ import org.testng.annotations.Test;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.ExecutionException;
 
@@ -99,14 +100,13 @@ public class QueryAsyncTest extends BaseTest {
   @DataProvider(name = "IndexTypes")
   public Object[][] provideIndexType() {
     return new Object[][] {
-      {IndexType.IVF_FLAT},
-      {IndexType.IVF_SQ8},
-      {IndexType.IVF_PQ},
-      {IndexType.HNSW},
-      {IndexType.ANNOY},
-      {IndexType.RHNSW_FLAT},
-      {IndexType.RHNSW_PQ},
-      {IndexType.RHNSW_SQ}
+            {IndexType.IVF_FLAT},
+            {IndexType.IVF_SQ8},
+            {IndexType.IVF_PQ},
+            {IndexType.HNSW},
+            {IndexType.SCANN},
+            {IndexType.GPU_IVF_FLAT},
+            {IndexType.GPU_IVF_PQ}
     };
   }
 
@@ -129,10 +129,7 @@ public class QueryAsyncTest extends BaseTest {
   public Object[][] providerBinaryMetricType() {
     return new Object[][] {
       {MetricType.HAMMING},
-      {MetricType.JACCARD},
-      {MetricType.SUBSTRUCTURE},
-      {MetricType.SUPERSTRUCTURE},
-      {MetricType.TANIMOTO}
+      {MetricType.JACCARD}
     };
   }
 
@@ -197,7 +194,7 @@ public class QueryAsyncTest extends BaseTest {
         QueryParam.newBuilder()
             .withCollectionName(CommonData.defaultCollection)
             .withPartitionNames(
-                usePart ? Arrays.asList(CommonData.defaultPartition) : Arrays.asList())
+                usePart ? Collections.singletonList(CommonData.defaultPartition) : Collections.emptyList())
             .withOutFields(outFields)
             .withExpr(SEARCH_PARAM)
             .build();
@@ -807,12 +804,6 @@ public class QueryAsyncTest extends BaseTest {
   @Severity(SeverityLevel.CRITICAL)
   public void stringPKAndBinaryVectorQueryUsingEachIndex(
           IndexType indexType, MetricType metricType) throws ExecutionException, InterruptedException {
-    boolean b =
-            metricType.equals(MetricType.SUBSTRUCTURE) || metricType.equals(MetricType.SUPERSTRUCTURE);
-
-    if (indexType.equals(IndexType.BIN_IVF_FLAT) && b) {
-      return;
-    }
     String stringPKAndBinaryCollection = CommonFunction.createStringPKAndBinaryCollection();
     // create index
     R<RpcStatus> rpcStatusR =
@@ -857,9 +848,6 @@ public class QueryAsyncTest extends BaseTest {
     R<QueryResults> queryResultsR = rListenableFuture.get();
     QueryResultsWrapper wrapperQuery = new QueryResultsWrapper(queryResultsR.getData());
     Assert.assertEquals(queryResultsR.getStatus().intValue(), 0);
-    if (b) {
-      return;
-    }
     System.out.println(wrapperQuery.getFieldWrapper("book_name").getFieldData());
     System.out.println(wrapperQuery.getFieldWrapper("book_content").getFieldData());
     Assert.assertTrue(wrapperQuery.getFieldWrapper("book_name").getFieldData().size() > 10);

+ 11 - 22
tests/milvustest/src/test/java/com/zilliz/milvustest/query/QueryTest.java

@@ -35,6 +35,7 @@ import org.testng.annotations.Test;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
 import static com.zilliz.milvustest.util.MathUtil.combine;
@@ -107,14 +108,13 @@ public class QueryTest extends BaseTest {
   @DataProvider(name = "IndexTypes")
   public Object[][] provideIndexType() {
     return new Object[][] {
-      {IndexType.IVF_FLAT},
-      {IndexType.IVF_SQ8},
-      {IndexType.IVF_PQ},
-      {IndexType.HNSW},
-      {IndexType.ANNOY},
-      {IndexType.RHNSW_FLAT},
-      {IndexType.RHNSW_PQ},
-      {IndexType.RHNSW_SQ}
+            {IndexType.IVF_FLAT},
+            {IndexType.IVF_SQ8},
+            {IndexType.IVF_PQ},
+            {IndexType.HNSW},
+            {IndexType.SCANN},
+            {IndexType.GPU_IVF_FLAT},
+            {IndexType.GPU_IVF_PQ}
     };
   }
 
@@ -137,10 +137,7 @@ public class QueryTest extends BaseTest {
   public Object[][] providerBinaryMetricType() {
     return new Object[][] {
       {MetricType.HAMMING},
-      {MetricType.JACCARD},
-      {MetricType.SUBSTRUCTURE},
-      {MetricType.SUPERSTRUCTURE},
-      {MetricType.TANIMOTO}
+      {MetricType.JACCARD}
     };
   }
 
@@ -818,12 +815,6 @@ public class QueryTest extends BaseTest {
   @Severity(SeverityLevel.CRITICAL)
   public void stringPKAndBinaryVectorQueryUsingEachIndex(
       IndexType indexType, MetricType metricType) {
-    boolean b =
-        metricType.equals(MetricType.SUBSTRUCTURE) || metricType.equals(MetricType.SUPERSTRUCTURE);
-
-    if (indexType.equals(IndexType.BIN_IVF_FLAT) && b) {
-      return;
-    }
     String stringPKAndBinaryCollection = CommonFunction.createStringPKAndBinaryCollection();
     // create index
     R<RpcStatus> rpcStatusR =
@@ -867,9 +858,7 @@ public class QueryTest extends BaseTest {
     R<QueryResults> queryResultsR = milvusClient.query(queryParam);
     QueryResultsWrapper wrapperQuery = new QueryResultsWrapper(queryResultsR.getData());
     Assert.assertEquals(queryResultsR.getStatus().intValue(), 0);
-    if (b) {
-      return;
-    }
+
     System.out.println(wrapperQuery.getFieldWrapper("book_name").getFieldData());
     System.out.println(wrapperQuery.getFieldWrapper("book_content").getFieldData());
     Assert.assertTrue(wrapperQuery.getFieldWrapper("book_name").getFieldData().size() > 10);
@@ -1031,7 +1020,7 @@ public class QueryTest extends BaseTest {
     CommonFunction.createIndexWithLoad(collectionWithDynamicField,IndexType.HNSW,MetricType.L2,CommonData.defaultVectorField);
     //query
 
-    List<String> outFields = Arrays.asList("extra_field");
+    List<String> outFields = Collections.singletonList("extra_field");
     QueryParam queryParam =
             QueryParam.newBuilder()
                     .withCollectionName(collectionWithDynamicField)

+ 4 - 16
tests/milvustest/src/test/java/com/zilliz/milvustest/search/SearchAsyncTest.java

@@ -103,10 +103,9 @@ public class SearchAsyncTest extends BaseTest {
       {IndexType.IVF_SQ8},
       {IndexType.IVF_PQ},
       {IndexType.HNSW},
-      {IndexType.ANNOY},
-      {IndexType.RHNSW_FLAT},
-      {IndexType.RHNSW_PQ},
-      {IndexType.RHNSW_SQ}
+      {IndexType.SCANN},
+      {IndexType.GPU_IVF_FLAT},
+      {IndexType.GPU_IVF_PQ}
     };
   }
 
@@ -129,10 +128,7 @@ public class SearchAsyncTest extends BaseTest {
   public Object[][] providerBinaryMetricType() {
     return new Object[][] {
       {MetricType.HAMMING},
-      {MetricType.JACCARD},
-      {MetricType.SUBSTRUCTURE},
-      {MetricType.SUPERSTRUCTURE},
-      {MetricType.TANIMOTO}
+      {MetricType.JACCARD}
     };
   }
 
@@ -1655,11 +1651,6 @@ public class SearchAsyncTest extends BaseTest {
       dataProvider = "BinaryIndex")
   public void stringPKAndBinaryVectorSearchAsyncWithEachIndex(
       IndexType indexType, MetricType metricType) {
-    boolean b =
-        metricType.equals(MetricType.SUBSTRUCTURE) || metricType.equals(MetricType.SUPERSTRUCTURE);
-    if (indexType.equals(IndexType.BIN_IVF_FLAT) && b) {
-      return;
-    }
     String stringPKAndBinaryCollection = CommonFunction.createStringPKAndBinaryCollection();
     // create index
     R<RpcStatus> rpcStatusR =
@@ -1710,9 +1701,6 @@ public class SearchAsyncTest extends BaseTest {
     ListenableFuture<R<SearchResults>> rListenableFuture = milvusClient.searchAsync(searchParam);
     try {
       Assert.assertEquals(rListenableFuture.get().getStatus().intValue(), 0);
-      if (b) {
-        return;
-      }
       SearchResultsWrapper searchResultsWrapper =
           new SearchResultsWrapper(rListenableFuture.get().getData().getResults());
       Assert.assertEquals(searchResultsWrapper.getFieldData("book_name", 0).size(), 2);

+ 8 - 20
tests/milvustest/src/test/java/com/zilliz/milvustest/search/SearchTest.java

@@ -126,14 +126,13 @@ public class SearchTest extends BaseTest {
   @DataProvider(name = "IndexTypes")
   public Object[][] provideIndexType() {
     return new Object[][] {
-      {IndexType.IVF_FLAT},
-      {IndexType.IVF_SQ8},
-      {IndexType.IVF_PQ},
-      {IndexType.HNSW},
-      {IndexType.ANNOY},
-      {IndexType.RHNSW_FLAT},
-      {IndexType.RHNSW_PQ},
-      {IndexType.RHNSW_SQ}
+            {IndexType.IVF_FLAT},
+            {IndexType.IVF_SQ8},
+            {IndexType.IVF_PQ},
+            {IndexType.HNSW},
+            {IndexType.SCANN},
+            {IndexType.GPU_IVF_FLAT},
+            {IndexType.GPU_IVF_PQ}
     };
   }
 
@@ -156,10 +155,7 @@ public class SearchTest extends BaseTest {
   public Object[][] providerBinaryMetricType() {
     return new Object[][] {
       {MetricType.HAMMING},
-      {MetricType.JACCARD},
-      {MetricType.SUBSTRUCTURE},
-      {MetricType.SUPERSTRUCTURE},
-      {MetricType.TANIMOTO}
+      {MetricType.JACCARD}
     };
   }
 
@@ -1520,11 +1516,6 @@ public class SearchTest extends BaseTest {
       dataProvider = "BinaryIndex")
   public void stringPKAndBinaryVectorSearchWithEachIndex(
       IndexType indexType, MetricType metricType) {
-    boolean b = metricType.equals(MetricType.SUBSTRUCTURE) || metricType.equals(MetricType.SUPERSTRUCTURE);
-
-    if(indexType.equals(IndexType.BIN_IVF_FLAT)&& b){
-      return;
-    }
     String stringPKAndBinaryCollection = CommonFunction.createStringPKAndBinaryCollection();
     // create index
     R<RpcStatus> rpcStatusR =
@@ -1575,9 +1566,6 @@ public class SearchTest extends BaseTest {
     R<SearchResults> searchResultsR = milvusClient.search(searchParam);
     System.out.println(searchResultsR.getData().getResults());
     Assert.assertEquals(searchResultsR.getStatus().intValue(), 0);
-    if (b){
-      return ;
-    }
     SearchResultsWrapper searchResultsWrapper =
         new SearchResultsWrapper(searchResultsR.getData().getResults());
     Assert.assertEquals(searchResultsWrapper.getFieldData("book_name", 0).size(), 2);

+ 0 - 145
tests/milvustest/src/test/java/com/zilliz/milvustest/serverless/HighLevel.java

@@ -1,145 +0,0 @@
-package com.zilliz.milvustest.serverless;
-
-import com.alibaba.fastjson.JSONObject;
-import com.google.common.collect.Lists;
-import com.zilliz.milvustest.common.BaseTest;
-import com.zilliz.milvustest.common.CommonFunction;
-import com.zilliz.milvustest.util.MathUtil;
-import io.milvus.param.R;
-import io.milvus.param.RpcStatus;
-import io.milvus.param.collection.DropCollectionParam;
-import io.milvus.param.highlevel.collection.CreateSimpleCollectionParam;
-import io.milvus.param.highlevel.collection.ListCollectionsParam;
-import io.milvus.param.highlevel.collection.response.ListCollectionsResponse;
-import io.milvus.param.highlevel.dml.*;
-import io.milvus.param.highlevel.dml.response.*;
-import io.qameta.allure.Epic;
-import io.qameta.allure.Feature;
-import io.qameta.allure.Severity;
-import io.qameta.allure.SeverityLevel;
-import org.testng.Assert;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * @Author yongpeng.li
- * @Date 2023/6/20 10:33
- */
-@Epic("HighLevelApi")
-@Feature("HighLevelApi")
-public class HighLevel extends BaseTest {
-
-    String commonCollection;
-
-    @DataProvider(name = "collectionByDataProvider")
-    public Object[][] provideCollectionName() {
-        return new String[][]{{"collection_" + MathUtil.getRandomString(10)}};
-    }
-
-    @Severity(SeverityLevel.BLOCKER)
-    @Test(description = "Create collection success", dataProvider = "collectionByDataProvider", groups = {"Smoke"})
-    public void createCollection(String collectionName) {
-        commonCollection = collectionName;
-        R<RpcStatus> collection = milvusClient.createCollection(CreateSimpleCollectionParam.newBuilder()
-                .withCollectionName(collectionName)
-                .withDescription("simple collection")
-                .withDimension(128)
-                .withAutoId(false)
-                .withVectorField("book_intro")
-                .withPrimaryField("book_id")
-                .build());
-        Assert.assertEquals(collection.getStatus().toString(), "0");
-        Assert.assertEquals(collection.getData().getMsg(), "Success");
-    }
-
-    @Severity(SeverityLevel.BLOCKER)
-    @Test(description = "List Collection", groups = {"Smoke"}, dependsOnMethods = "createCollection")
-    public void listCollection() {
-        R<ListCollectionsResponse> listCollectionsResponseR = milvusClient.listCollections(ListCollectionsParam.newBuilder().build());
-        Assert.assertEquals(listCollectionsResponseR.getStatus().intValue(), R.Status.Success.getCode());
-        Assert.assertTrue(listCollectionsResponseR.getData().collectionNames.contains(commonCollection));
-    }
-
-    @Severity(SeverityLevel.BLOCKER)
-    @Test(description = "insert data into Collection", groups = {"Smoke"}, dependsOnMethods = "listCollection")
-    public void insertIntoCollection() {
-        List<JSONObject> jsonObjects = CommonFunction.generateDataWithDynamicFiledRow(10000);
-        R<InsertResponse> insert = milvusClient.insert(InsertRowsParam.newBuilder()
-                .withCollectionName(commonCollection)
-                .withRows(jsonObjects)
-                .build());
-        Assert.assertEquals(insert.getStatus().intValue(), R.Status.Success.getCode());
-        Assert.assertEquals(insert.getData().getInsertCount().intValue(), 10000);
-    }
-
-
-    @Severity(SeverityLevel.BLOCKER)
-    @Test(description = "search Collection", groups = {"Smoke"}, dependsOnMethods = "insertIntoCollection")
-    public void searchCollection() {
-        List<List<Float>> search_vectors = Arrays.asList(Arrays.asList(MathUtil.generateFloat(128)));
-        R<SearchResponse> search = milvusClient.search(SearchSimpleParam.newBuilder()
-                .withCollectionName(commonCollection)
-                .withOffset(0L)
-                .withLimit(100)
-                .withFilter("book_id>5000")
-                .withVectors(search_vectors)
-                .withOutputFields(Lists.newArrayList("*"))
-                .build());
-        Assert.assertEquals(search.getStatus().intValue(), R.Status.Success.getCode());
-        Assert.assertEquals(search.getData().getRowRecords().size(), 100);
-        System.out.println("search:"+search.getData().getRowRecords().toString());
-    }
-
-    @Severity(SeverityLevel.BLOCKER)
-    @Test(description = "query Collection", groups = {"Smoke"}, dependsOnMethods = "insertIntoCollection")
-    public void queryCollection() {
-        R<QueryResponse> query = milvusClient.query(QuerySimpleParam.newBuilder()
-                .withCollectionName(commonCollection)
-                .withFilter("book_id>5000")
-                .withLimit(100L)
-                .withOffset(0L)
-                .withOutFields(Lists.newArrayList("*"))
-                .build());
-        Assert.assertEquals(query.getStatus().intValue(), R.Status.Success.getCode());
-        Assert.assertEquals(query.getData().getRowRecords().size(), 100);
-        System.out.println("query:"+query.getData().getRowRecords().toString());
-    }
-
-    @Severity(SeverityLevel.BLOCKER)
-    @Test(description = "get Collection", groups = {"Smoke"}, dependsOnMethods = "insertIntoCollection")
-    public void getCollection() {
-        R<GetResponse> getResponseR = milvusClient.get(GetIdsParam.newBuilder()
-                .withCollectionName(commonCollection)
-                .withOutputFields(Lists.newArrayList("*"))
-                .withPrimaryIds(Lists.newArrayList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
-                .build());
-        Assert.assertEquals(getResponseR.getStatus().intValue(), R.Status.Success.getCode());
-        Assert.assertEquals(getResponseR.getData().getRowRecords().size(), 10);
-        System.out.println("get:"+getResponseR.getData().getRowRecords().toString());
-    }
-
-
-    @Severity(SeverityLevel.BLOCKER)
-    @Test(description = "delete data ", groups = {"Smoke"}, dependsOnMethods = {"searchCollection", "queryCollection","getCollection"})
-    public void delete() {
-        ArrayList<Integer> integers = Lists.newArrayList(11, 12, 13, 14, 15, 16, 17, 18, 19, 20);
-        R<DeleteResponse> delete = milvusClient.delete(DeleteIdsParam.newBuilder()
-                .withCollectionName(commonCollection)
-                .withPrimaryIds(integers)
-                .build());
-        Assert.assertEquals(delete.getStatus().intValue(), R.Status.Success.getCode());
-        Assert.assertEquals(delete.getData().getDeleteIds().size(), integers.size());
-    }
-
-    @Severity(SeverityLevel.BLOCKER)
-    @Test(description = "drop Collection", groups = {"Smoke"}, dependsOnMethods = {"delete"})
-    public void dropCollection() {
-        R<RpcStatus> rpcStatusR = milvusClient.dropCollection(DropCollectionParam.newBuilder()
-                .withCollectionName(commonCollection).build());
-        Assert.assertEquals(rpcStatusR.getStatus().intValue(), R.Status.Success.getCode());
-    }
-}

+ 254 - 0
tests/milvustest/src/test/java/com/zilliz/milvustest/serverless/HighLevelTest.java

@@ -0,0 +1,254 @@
+package com.zilliz.milvustest.serverless;
+
+import com.alibaba.fastjson.JSONObject;
+import com.google.common.collect.Lists;
+import com.zilliz.milvustest.common.BaseTest;
+import com.zilliz.milvustest.common.CommonData;
+import com.zilliz.milvustest.common.CommonFunction;
+import com.zilliz.milvustest.util.MathUtil;
+import io.milvus.grpc.DataType;
+import io.milvus.param.R;
+import io.milvus.param.RpcStatus;
+import io.milvus.param.collection.DropCollectionParam;
+import io.milvus.param.highlevel.collection.CreateSimpleCollectionParam;
+import io.milvus.param.highlevel.collection.ListCollectionsParam;
+import io.milvus.param.highlevel.collection.response.ListCollectionsResponse;
+import io.milvus.param.highlevel.dml.*;
+import io.milvus.param.highlevel.dml.response.*;
+import io.qameta.allure.Epic;
+import io.qameta.allure.Feature;
+import io.qameta.allure.Severity;
+import io.qameta.allure.SeverityLevel;
+import org.testng.Assert;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @Author yongpeng.li
+ * @Date 2023/6/20 10:33
+ */
+@Epic("HighLevelApi")
+@Feature("HighLevelApi")
+public class HighLevelTest extends BaseTest {
+
+    String commonCollection;
+    String varcharPKCollection;
+
+    @BeforeTest(alwaysRun = true)
+    public void provideTestData(){
+        commonCollection="collection_" + MathUtil.getRandomString(10);
+        varcharPKCollection="collection_" + MathUtil.getRandomString(10);
+    }
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "Create collection success", groups = {"Smoke"})
+    public void createCollectionTest() {
+        R<RpcStatus> collection = milvusClient.createCollection(CreateSimpleCollectionParam.newBuilder()
+                .withCollectionName(commonCollection)
+                .withDescription("simple collection")
+                .withDimension(128)
+                .withAutoId(false)
+                .withVectorField("book_intro")
+                .withPrimaryField("book_id").withPrimaryFieldType(DataType.Int64)
+                .build());
+        Assert.assertEquals(collection.getStatus().toString(), "0");
+        Assert.assertEquals(collection.getData().getMsg(), "Success");
+    }
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "List Collection", groups = {"Smoke"}, dependsOnMethods = "createCollectionTest")
+    public void listCollectionTest() {
+        R<ListCollectionsResponse> listCollectionsResponseR = milvusClient.listCollections(ListCollectionsParam.newBuilder().build());
+        Assert.assertEquals(listCollectionsResponseR.getStatus().intValue(), R.Status.Success.getCode());
+        Assert.assertTrue(listCollectionsResponseR.getData().collectionNames.contains(commonCollection));
+    }
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "insert data into Collection", groups = {"Smoke"}, dependsOnMethods = "listCollectionTest")
+    public void insertIntoCollectionTest() {
+        List<JSONObject> jsonObjects = CommonFunction.generateDataWithDynamicFiledRow(10000);
+        R<InsertResponse> insert = milvusClient.insert(InsertRowsParam.newBuilder()
+                .withCollectionName(commonCollection)
+                .withRows(jsonObjects)
+                .build());
+        Assert.assertEquals(insert.getStatus().intValue(), R.Status.Success.getCode());
+        Assert.assertEquals(insert.getData().getInsertCount().intValue(), 10000);
+    }
+
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "search Collection", groups = {"Smoke"}, dependsOnMethods = "insertIntoCollectionTest")
+    public void searchCollection() {
+        List<List<Float>> search_vectors = Collections.singletonList(Arrays.asList(MathUtil.generateFloat(128)));
+        R<SearchResponse> search = milvusClient.search(SearchSimpleParam.newBuilder()
+                .withCollectionName(commonCollection)
+                .withOffset(0L)
+                .withLimit(100L)
+                .withFilter("book_id>5000")
+                .withVectors(search_vectors)
+                .withOutputFields(Lists.newArrayList("*"))
+                .build());
+        Assert.assertEquals(search.getStatus().intValue(), R.Status.Success.getCode());
+        Assert.assertEquals(search.getData().getRowRecords().size(), 100);
+        System.out.println("search:"+search.getData().getRowRecords().toString());
+    }
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "query Collection", groups = {"Smoke"}, dependsOnMethods = "insertIntoCollectionTest")
+    public void queryCollection() {
+        R<QueryResponse> query = milvusClient.query(QuerySimpleParam.newBuilder()
+                .withCollectionName(commonCollection)
+                .withFilter("book_id>5000")
+                .withLimit(100L)
+                .withOffset(0L)
+                .withOutputFields(Lists.newArrayList("*"))
+                .build());
+        Assert.assertEquals(query.getStatus().intValue(), R.Status.Success.getCode());
+        Assert.assertEquals(query.getData().getRowRecords().size(), 100);
+        System.out.println("query:"+query.getData().getRowRecords().toString());
+    }
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "get Collection", groups = {"Smoke"}, dependsOnMethods = "insertIntoCollectionTest")
+    public void getCollection() {
+        R<GetResponse> getResponseR = milvusClient.get(GetIdsParam.newBuilder()
+                .withCollectionName(commonCollection)
+                .withOutputFields(Lists.newArrayList("*"))
+                .withPrimaryIds(Lists.newArrayList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
+                .build());
+        Assert.assertEquals(getResponseR.getStatus().intValue(), R.Status.Success.getCode());
+        Assert.assertEquals(getResponseR.getData().getRowRecords().size(), 10);
+        System.out.println("get:"+getResponseR.getData().getRowRecords().toString());
+    }
+
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "delete data ", groups = {"Smoke"}, dependsOnMethods = {"searchCollection", "queryCollection","getCollection"})
+    public void delete() {
+        ArrayList<Integer> integers = Lists.newArrayList(11, 12, 13, 14, 15, 16, 17, 18, 19, 20);
+        R<DeleteResponse> delete = milvusClient.delete(DeleteIdsParam.newBuilder()
+                .withCollectionName(commonCollection)
+                .withPrimaryIds(integers)
+                .build());
+        Assert.assertEquals(delete.getStatus().intValue(), R.Status.Success.getCode());
+        Assert.assertEquals(delete.getData().getDeleteIds().size(), integers.size());
+    }
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "drop collection", groups = {"Smoke"}, dependsOnMethods = {"delete"})
+    public void dropCollection() {
+        R<RpcStatus> rpcStatusR = milvusClient.dropCollection(DropCollectionParam.newBuilder()
+                .withCollectionName(commonCollection).build());
+        Assert.assertEquals(rpcStatusR.getStatus().intValue(), R.Status.Success.getCode());
+    }
+
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "create collection with varchar PK",groups = {"Smoke"})
+    public  void createCollectionWithVarcharPK(){
+        R<RpcStatus> collection = milvusClient.createCollection(CreateSimpleCollectionParam.newBuilder()
+                .withCollectionName(varcharPKCollection)
+                .withDescription("simple collection")
+                .withDimension(128)
+                .withAutoId(false)
+                .withVectorField(CommonData.defaultVectorField)
+                .withPrimaryField("book_name")
+                .withPrimaryFieldType(DataType.VarChar)
+                .withMaxLength(100)
+                .build());
+        Assert.assertEquals(collection.getStatus().toString(), "0");
+        Assert.assertEquals(collection.getData().getMsg(), "Success");
+    }
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "List varchar pk collection", groups = {"Smoke"}, dependsOnMethods = "createCollectionWithVarcharPK")
+    public void listVarcharPKCollectionTest() {
+        R<ListCollectionsResponse> listCollectionsResponseR = milvusClient.listCollections(ListCollectionsParam.newBuilder().build());
+        Assert.assertEquals(listCollectionsResponseR.getStatus().intValue(), R.Status.Success.getCode());
+        Assert.assertTrue(listCollectionsResponseR.getData().collectionNames.contains(varcharPKCollection));
+    }
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "insert data into varchar PK Collection", groups = {"Smoke"}, dependsOnMethods = "listVarcharPKCollectionTest")
+    public void insertIntoVarcharPKCollectionTest() {
+        List<JSONObject> jsonObjects = CommonFunction.generateVarcharPKDataWithDynamicFiledRow(10000);
+        R<InsertResponse> insert = milvusClient.insert(InsertRowsParam.newBuilder()
+                .withCollectionName(varcharPKCollection)
+                .withRows(jsonObjects)
+                .build());
+        Assert.assertEquals(insert.getStatus().intValue(), R.Status.Success.getCode());
+        Assert.assertEquals(insert.getData().getInsertCount().intValue(), 10000);
+    }
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "search varchar PK Collection", groups = {"Smoke"}, dependsOnMethods = "insertIntoVarcharPKCollectionTest")
+    public void searchVarcharPKCollection() {
+        List<List<Float>> search_vectors = Collections.singletonList(Arrays.asList(MathUtil.generateFloat(128)));
+        R<SearchResponse> search = milvusClient.search(SearchSimpleParam.newBuilder()
+                .withCollectionName(varcharPKCollection)
+                .withOffset(0L)
+                .withLimit(100L)
+                .withFilter("book_name>\"StringPK5000\"")
+                .withVectors(search_vectors)
+                .withOutputFields(Lists.newArrayList("*"))
+                .build());
+        Assert.assertEquals(search.getStatus().intValue(), R.Status.Success.getCode());
+        Assert.assertEquals(search.getData().getRowRecords().size(), 100);
+        System.out.println("search:"+search.getData().getRowRecords().toString());
+    }
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "query varchar PK Collection", groups = {"Smoke"}, dependsOnMethods = "insertIntoVarcharPKCollectionTest")
+    public void queryVarcharPKCollection() {
+        R<QueryResponse> query = milvusClient.query(QuerySimpleParam.newBuilder()
+                .withCollectionName(varcharPKCollection)
+                .withFilter("book_name>\"StringPK5000\"")
+                .withLimit(100L)
+                .withOffset(0L)
+                .withOutputFields(Lists.newArrayList("*"))
+                .build());
+        Assert.assertEquals(query.getStatus().intValue(), R.Status.Success.getCode());
+        Assert.assertEquals(query.getData().getRowRecords().size(), 100);
+        System.out.println("query:"+query.getData().getRowRecords().toString());
+    }
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "get varchar pk Collection", groups = {"Smoke"}, dependsOnMethods = "insertIntoVarcharPKCollectionTest")
+    public void getVarcharPKCollection() {
+        R<GetResponse> getResponseR = milvusClient.get(GetIdsParam.newBuilder()
+                .withCollectionName(varcharPKCollection)
+                .withOutputFields(Lists.newArrayList("*"))
+                .withPrimaryIds(Lists.newArrayList("StringPK0", "StringPK1", "StringPK2", "StringPK3", "StringPK4", "StringPK5", "StringPK6", "StringPK7", "StringPK8", "StringPK9"))
+                .build());
+        Assert.assertEquals(getResponseR.getStatus().intValue(), R.Status.Success.getCode());
+        Assert.assertEquals(getResponseR.getData().getRowRecords().size(), 10);
+        System.out.println("get:"+getResponseR.getData().getRowRecords().toString());
+    }
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "delete varchar PK data ", groups = {"Smoke"}, dependsOnMethods = {"searchVarcharPKCollection", "queryVarcharPKCollection","getVarcharPKCollection"})
+    public void deleteVarcharPKData() {
+        ArrayList<String> pks = Lists.newArrayList( "StringPK11", "StringPK12", "StringPK13", "StringPK14", "StringPK15", "StringPK16", "StringPK17", "StringPK18", "StringPK19","StringPK20");
+        R<DeleteResponse> delete = milvusClient.delete(DeleteIdsParam.newBuilder()
+                .withCollectionName(varcharPKCollection)
+                .withPrimaryIds(pks)
+                .build());
+        Assert.assertEquals(delete.getStatus().intValue(), R.Status.Success.getCode());
+        Assert.assertEquals(delete.getData().getDeleteIds().size(), pks.size());
+    }
+
+
+    @Severity(SeverityLevel.BLOCKER)
+    @Test(description = "drop varchar PK collection", groups = {"Smoke"}, dependsOnMethods = {"deleteVarcharPKData"})
+    public void dropVarcharPKCollection() {
+        R<RpcStatus> rpcStatusR = milvusClient.dropCollection(DropCollectionParam.newBuilder()
+                .withCollectionName(varcharPKCollection).build());
+        Assert.assertEquals(rpcStatusR.getStatus().intValue(), R.Status.Success.getCode());
+    }
+}

+ 1 - 0
tests/milvustest/src/test/java/resources/run.properties

@@ -2,6 +2,7 @@ milvusHost=127.0.0.1
 milvusPort=19530
 ScenarioDesc=CI
 BuildId=1d
+SDKBranch=Master
 #enviroment
 milvusV=2.2.2
 milvusJdkJavaV=2.2.0

+ 1 - 0
tests/milvustest/testng.xml

@@ -11,6 +11,7 @@
             <package name="com.zilliz.milvustest.*">
                 <exclude name="com.zilliz.milvustest.limit.*"></exclude>
                 <exclude name="com.zilliz.milvustest.vdc.*"></exclude>
+                <exclude name="com.zilliz.milvustest.tls.*"></exclude>
             </package>
         </packages>
     </test>