Skip to content

Commit

Permalink
Skip delete .plugins-ml-config system index during integ test
Browse files Browse the repository at this point in the history
Signed-off-by: Junqiu Lei <[email protected]>
  • Loading branch information
junqiu-lei committed Jan 25, 2024
1 parent 89fc267 commit b1418df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import static org.opensearch.knn.TestUtils.KNN_BWC_PREFIX;
import static org.opensearch.knn.TestUtils.OPENDISTRO_SECURITY;
import static org.opensearch.knn.TestUtils.OPENSEARCH_SYSTEM_INDEX_PREFIX;
import static org.opensearch.knn.TestUtils.PLUGINS_ML_CONFIG_INDEX_NAME;
import static org.opensearch.knn.TestUtils.SECURITY_AUDITLOG_PREFIX;
import static org.opensearch.knn.TestUtils.SKIP_DELETE_MODEL_INDEX;
import static org.opensearch.knn.common.KNNConstants.MODELS;
Expand Down Expand Up @@ -212,6 +213,7 @@ private boolean skipDeleteIndex(String indexName) {
return indexName == null
|| OPENDISTRO_SECURITY.equals(indexName)
|| IMMUTABLE_INDEX_PREFIXES.stream().anyMatch(indexName::startsWith)
|| MODEL_INDEX_NAME.equals(indexName);
|| MODEL_INDEX_NAME.equals(indexName)
|| PLUGINS_ML_CONFIG_INDEX_NAME.equals(indexName);
}
}
1 change: 1 addition & 0 deletions src/testFixtures/java/org/opensearch/knn/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public class TestUtils {
public static final String UPGRADED_CLUSTER = "upgraded_cluster";
public static final String SECURITY_AUDITLOG_PREFIX = "security-auditlog";
public static final String OPENSEARCH_SYSTEM_INDEX_PREFIX = ".opensearch";
public static final String PLUGINS_ML_CONFIG_INDEX_NAME = ".plugins-ml-config";

// Generating vectors using random function with a seed which makes these vectors standard and generate same vectors for each run.
public static float[][] randomlyGenerateStandardVectors(int numVectors, int dimensions, int seed) {
Expand Down

0 comments on commit b1418df

Please sign in to comment.