Skip to content

Commit

Permalink
Fixed failing tests
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Gaievski <[email protected]>
  • Loading branch information
martin-gaievski committed Aug 25, 2023
1 parent fb023f4 commit 19a321c
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
import java.nio.file.Path;
import java.util.Map;

import lombok.SneakyThrows;

import org.apache.http.HttpHeaders;
import org.apache.http.message.BasicHeader;
import org.apache.http.util.EntityUtils;
import org.junit.After;
import org.opensearch.client.Response;
import org.opensearch.common.xcontent.XContentHelper;
import org.opensearch.common.xcontent.XContentType;
Expand All @@ -25,6 +28,17 @@ public class TextEmbeddingProcessorIT extends BaseNeuralSearchIT {

private static final String PIPELINE_NAME = "pipeline-hybrid";

@After
@SneakyThrows
public void tearDown() {
super.tearDown();
/* this is required to minimize chance of model not being deployed due to open memory CB,
* this happens in case we leave model from previous test case. We use new model for every test, and old model
* can be undeployed and deleted to free resources after each test case execution.
*/
findDeployedModels().forEach(this::deleteModel);
}

public void testTextEmbeddingProcessor() throws Exception {
String modelId = uploadTextEmbeddingModel();
loadModel(modelId);
Expand Down

0 comments on commit 19a321c

Please sign in to comment.