|
@@ -162,10 +162,15 @@ public class IndexLoadTest extends BaseTest {
|
|
@Severity(SeverityLevel.NORMAL)
|
|
@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) {
|
|
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
|
|
// 1. create index params
|
|
CreateIndexParam createIndexParams = CreateIndexParam.newBuilder()
|
|
CreateIndexParam createIndexParams = CreateIndexParam.newBuilder()
|
|
.withCollectionName(binaryCollection)
|
|
.withCollectionName(binaryCollection)
|
|
- .withFieldName(CommonData.defaultVectorField)
|
|
|
|
|
|
+ .withFieldName(CommonData.defaultBinaryVectorField)
|
|
.withMetricType(metricType)
|
|
.withMetricType(metricType)
|
|
.withIndexType(indexType)
|
|
.withIndexType(indexType)
|
|
.withExtraParam(CommonFunction.provideExtraParam(indexType))
|
|
.withExtraParam(CommonFunction.provideExtraParam(indexType))
|
|
@@ -207,7 +212,7 @@ public class IndexLoadTest extends BaseTest {
|
|
// 6. release collection
|
|
// 6. release collection
|
|
R<RpcStatus> rpcStatusR5 = milvusClient.releaseCollection(
|
|
R<RpcStatus> rpcStatusR5 = milvusClient.releaseCollection(
|
|
ReleaseCollectionParam.newBuilder()
|
|
ReleaseCollectionParam.newBuilder()
|
|
- .withCollectionName(collection)
|
|
|
|
|
|
+ .withCollectionName(binaryCollection)
|
|
.build());
|
|
.build());
|
|
System.out.println("Release collection " + rpcStatusR);
|
|
System.out.println("Release collection " + rpcStatusR);
|
|
Assert.assertEquals(rpcStatusR5.getStatus().intValue(), 0);
|
|
Assert.assertEquals(rpcStatusR5.getStatus().intValue(), 0);
|
|
@@ -223,7 +228,7 @@ public class IndexLoadTest extends BaseTest {
|
|
// 8. drop index
|
|
// 8. drop index
|
|
R<RpcStatus> rpcStatusR7 = milvusClient.dropIndex(
|
|
R<RpcStatus> rpcStatusR7 = milvusClient.dropIndex(
|
|
DropIndexParam.newBuilder()
|
|
DropIndexParam.newBuilder()
|
|
- .withCollectionName(collection)
|
|
|
|
|
|
+ .withCollectionName(binaryCollection)
|
|
.build());
|
|
.build());
|
|
System.out.println("Drop index " + rpcStatusR);
|
|
System.out.println("Drop index " + rpcStatusR);
|
|
Assert.assertEquals(rpcStatusR7.getStatus().intValue(), 0);
|
|
Assert.assertEquals(rpcStatusR7.getStatus().intValue(), 0);
|