Skip to content

Commit

Permalink
Skip delete .plugins-ml-config system index during integ test (#1419)
Browse files Browse the repository at this point in the history
  • Loading branch information
junqiu-lei authored Jan 25, 2024
1 parent 0c000ad commit 47728ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@

import static org.opensearch.knn.TestUtils.KNN_BWC_PREFIX;
import static org.opensearch.knn.TestUtils.OPENDISTRO_SECURITY;
import static org.opensearch.knn.TestUtils.ML_PLUGIN_SYSTEM_INDEX_PREFIX;
import static org.opensearch.knn.TestUtils.OPENSEARCH_SYSTEM_INDEX_PREFIX;
import static org.opensearch.knn.TestUtils.SECURITY_AUDITLOG_PREFIX;
import static org.opensearch.knn.TestUtils.SKIP_DELETE_MODEL_INDEX;
Expand All @@ -62,7 +63,12 @@
*/
public abstract class ODFERestTestCase extends OpenSearchRestTestCase {

private final Set<String> IMMUTABLE_INDEX_PREFIXES = Set.of(KNN_BWC_PREFIX, SECURITY_AUDITLOG_PREFIX, OPENSEARCH_SYSTEM_INDEX_PREFIX);
private final Set<String> IMMUTABLE_INDEX_PREFIXES = Set.of(
KNN_BWC_PREFIX,
SECURITY_AUDITLOG_PREFIX,
OPENSEARCH_SYSTEM_INDEX_PREFIX,
ML_PLUGIN_SYSTEM_INDEX_PREFIX
);

protected boolean isHttps() {
return Optional.ofNullable(System.getProperty("https")).map("true"::equalsIgnoreCase).orElse(false);
Expand Down
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 ML_PLUGIN_SYSTEM_INDEX_PREFIX = ".plugins-ml";

// 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 47728ce

Please sign in to comment.