Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Jackie Han <[email protected]>
  • Loading branch information
jackiehanyang committed Dec 12, 2023
1 parent 771da9f commit dbf5fc8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ public class CreateWorkflowTransportAction extends HandledTransportAction<Workfl
private final Client client;
private final Settings settings;

private final TransportService transportService;

/**
* Intantiates a new CreateWorkflowTransportAction
* @param transportService the TransportService
Expand All @@ -72,7 +70,6 @@ public CreateWorkflowTransportAction(
Client client
) {
super(CreateWorkflowAction.NAME, transportService, actionFilters, WorkflowRequest::new);
this.transportService = transportService;
this.workflowProcessSorter = workflowProcessSorter;
this.flowFrameworkIndicesHandler = flowFrameworkIndicesHandler;
this.settings = settings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public void testCreateNewWorkflow() {
WorkflowRequest workflowRequest = new WorkflowRequest(
null,
template,
true,
false,
WORKFLOW_REQUEST_TIMEOUT.get(settings),
MAX_WORKFLOWS.get(settings)
);
Expand Down Expand Up @@ -228,14 +228,6 @@ public void testCreateNewWorkflow() {
return null;
}).when(flowFrameworkIndicesHandler).putInitialStateToWorkflowState(any(), any(), any());

doAnswer(invocation -> {
ActionListener<WorkflowResponse> responseListener = invocation.getArgument(2);
WorkflowResponse response = mock(WorkflowResponse.class);
when(response.getWorkflowId()).thenReturn("1");
responseListener.onResponse(response);
return null;
}).when(client).execute(eq(ProvisionWorkflowAction.INSTANCE), any(WorkflowRequest.class), any(ActionListener.class));

ArgumentCaptor<WorkflowResponse> workflowResponseCaptor = ArgumentCaptor.forClass(WorkflowResponse.class);

createWorkflowTransportAction.doExecute(mock(Task.class), workflowRequest, listener);
Expand Down

0 comments on commit dbf5fc8

Please sign in to comment.