Skip to content

Commit

Permalink
Fix max workflows setting test (opensearch-project#268)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <[email protected]>
  • Loading branch information
dbwiddis committed Dec 13, 2023
1 parent 72131bb commit 551e768
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

/**
* Abstract class to handle search request.
* @param <T> The type to search
*/
public abstract class AbstractSearchWorkflowAction<T extends ToXContentObject> extends BaseRestHandler {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
*/
public class NoOpStep implements WorkflowStep {

/** Instantiate this class */
public NoOpStep() {}

/** The name of this step, used as a key in the template and the {@link WorkflowStepFactory} */
public static final String NAME = "noop";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void setUp() throws Exception {
super.setUp();
threadPool = mock(ThreadPool.class);
settings = Settings.builder()
.put("plugins.flow_framework.max_workflows.", 2)
.put("plugins.flow_framework.max_workflows", 2)
.put("plugins.flow_framework.request_timeout", TimeValue.timeValueSeconds(10))
.build();
this.flowFrameworkIndicesHandler = mock(FlowFrameworkIndicesHandler.class);
Expand Down Expand Up @@ -193,7 +193,7 @@ public void testMaxWorkflow() {
createWorkflowTransportAction.doExecute(mock(Task.class), workflowRequest, listener);
ArgumentCaptor<Exception> exceptionCaptor = ArgumentCaptor.forClass(Exception.class);
verify(listener, times(1)).onFailure(exceptionCaptor.capture());
assertEquals(("Maximum workflows limit reached 1000"), exceptionCaptor.getValue().getMessage());
assertEquals(("Maximum workflows limit reached 2"), exceptionCaptor.getValue().getMessage());
}

public void testMaxWorkflowWithNoIndex() {
Expand Down

0 comments on commit 551e768

Please sign in to comment.