Skip to content

Commit

Permalink
Remove test instead of ignoring
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Bogan <[email protected]>
  • Loading branch information
ryanbogan committed Jan 2, 2024
1 parent 81ecb4a commit 28e3fac
Showing 1 changed file with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@

import org.apache.hc.core5.http.io.entity.EntityUtils;
import org.junit.AfterClass;
import org.junit.Ignore;
import org.opensearch.action.search.SearchResponse;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import org.opensearch.client.ResponseException;
import org.opensearch.core.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentFactory;
import org.opensearch.core.xcontent.XContentParser;
Expand All @@ -25,7 +23,6 @@
import org.opensearch.search.SearchHit;

import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Map;

Expand Down Expand Up @@ -142,23 +139,6 @@ public void testKNNModelDefault() throws Exception {
}
}

// KNN Delete Model test for model in Training State
@Ignore
public void testDeleteTrainingModel() throws Exception {
if (isRunningAgainstOldCluster()) {
byte[] testModelBlob = "hello".getBytes(StandardCharsets.UTF_8);
ModelMetadata testModelMetadata = getModelMetadata();
testModelMetadata.setState(ModelState.TRAINING);
addModelToSystemIndex(TEST_MODEL_ID_TRAINING, testModelMetadata, testModelBlob);

String restURI = String.join("/", KNNPlugin.KNN_BASE_URI, MODELS, TEST_MODEL_ID_TRAINING);
Request request = new Request("DELETE", restURI);

ResponseException ex = expectThrows(ResponseException.class, () -> client().performRequest(request));
assertEquals(RestStatus.CONFLICT.getStatus(), ex.getResponse().getStatusLine().getStatusCode());
}
}

// Delete Models and ".opensearch-knn-models" index to clear cluster metadata
@AfterClass
public static void wipeAllModels() throws IOException {
Expand Down

0 comments on commit 28e3fac

Please sign in to comment.