Skip to content

Commit

Permalink
check if excpetion is thrown
Browse files Browse the repository at this point in the history
  • Loading branch information
will-hwang committed Jan 8, 2025
1 parent 7e8c114 commit 525c633
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

import org.opensearch.index.query.MatchQueryBuilder;

import static org.opensearch.knn.index.query.KNNQueryBuilder.EXPAND_NESTED_FIELD;
import static org.opensearch.neuralsearch.common.MinClusterVersionUtil.isClusterOnOrAfterMinReqVersion;
import static org.opensearch.neuralsearch.util.TestUtils.getModelId;
import static org.opensearch.neuralsearch.util.TestUtils.NODES_BWC_CLUSTER;
import static org.opensearch.neuralsearch.util.TestUtils.PARAM_NAME_WEIGHTS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ public void testSemanticSearch_E2EFlow() throws Exception {
addDocument(getIndexNameForTest(), "0", TEST_FIELD, TEXT, null, null);
break;
case MIXED:
modelId = getModelId(getIngestionPipeline(PIPELINE_NAME), TEXT_EMBEDDING_PROCESSOR);
int totalDocsCountMixed;
loadModel(modelId);
if (isFirstMixedRound()) {
totalDocsCountMixed = NUM_DOCS_PER_ROUND;
validateTestIndexOnUpgrade(totalDocsCountMixed, modelId, TEXT);
addDocument(getIndexNameForTest(), "1", TEST_FIELD, TEXT_MIXED, null, null);
} else {
totalDocsCountMixed = 2 * NUM_DOCS_PER_ROUND;
validateTestIndexOnUpgrade(totalDocsCountMixed, modelId, TEXT_MIXED);
}
break;
// modelId = getModelId(getIngestionPipeline(PIPELINE_NAME), TEXT_EMBEDDING_PROCESSOR);
// int totalDocsCountMixed;
throw new IllegalArgumentException("HWANGW");
// if (isFirstMixedRound()) {
// totalDocsCountMixed = NUM_DOCS_PER_ROUND;
// validateTestIndexOnUpgrade(totalDocsCountMixed, modelId, TEXT);
// addDocument(getIndexNameForTest(), "1", TEST_FIELD, TEXT_MIXED, null, null);
// } else {
// totalDocsCountMixed = 2 * NUM_DOCS_PER_ROUND;
// validateTestIndexOnUpgrade(totalDocsCountMixed, modelId, TEXT_MIXED);
// }
// break;
case UPGRADED:
try {
modelId = getModelId(getIngestionPipeline(PIPELINE_NAME), TEXT_EMBEDDING_PROCESSOR);
Expand Down

0 comments on commit 525c633

Please sign in to comment.