Skip to content

Commit

Permalink
[Backport 2.x] Fix testDefaultSemanticSearchUseCaseWithFailureExpected (
Browse files Browse the repository at this point in the history
#664)

Fix testDefaultSemanticSearchUseCaseWithFailureExpected (#663)

Fixing integ test


(cherry picked from commit 46d70da)

Signed-off-by: Joshua Palis <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 7a5ffdd commit 6537194
Showing 1 changed file with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -471,21 +471,9 @@ public void testDefaultSemanticSearchUseCaseWithFailureExpected() throws Excepti
}

assertEquals(RestStatus.OK, TestHelpers.restStatus(response));

// Distribution build contains all plugins, checking if plugins are part of the integration test cluster
List<String> plugins = catPlugins();
if (plugins.contains("opensearch-knn") && plugins.contains("opensearch-neural-search")) {
getAndAssertWorkflowStatus(client(), workflowId, State.PROVISIONING, ProvisioningProgress.IN_PROGRESS);
} else {
// expecting a failure since there is no neural-search plugin in cluster to provide text-embedding processor
getAndAssertWorkflowStatus(client(), workflowId, State.FAILED, ProvisioningProgress.FAILED);
String error = getAndWorkflowStatusError(client(), workflowId);
assertTrue(
error.contains(
"org.opensearch.flowframework.exception.WorkflowStepException during step create_ingest_pipeline, restStatus: BAD_REQUEST"
)
);
}
getAndAssertWorkflowStatus(client(), workflowId, State.FAILED, ProvisioningProgress.FAILED);
String error = getAndWorkflowStatusError(client(), workflowId);
assertTrue(error.contains("org.opensearch.flowframework.exception.WorkflowStepException during step create_ingest_pipeline"));
}

public void testAllDefaultUseCasesCreation() throws Exception {
Expand Down

0 comments on commit 6537194

Please sign in to comment.