Skip to content

Commit

Permalink
task search is now supported
Browse files Browse the repository at this point in the history
  • Loading branch information
manan164 committed Mar 12, 2024
1 parent 059f76b commit 94f88d1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,6 @@ public void testUnsupportedMethods() {
() -> {
taskClient.searchV2("freeText");
});
assertThrows(
UnsupportedOperationException.class,
() -> {
taskClient.search(4, 20, "sort", "freeText", "query");
});

assertThrows(
UnsupportedOperationException.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,66 +99,6 @@ public void testSearchByCorrelationIds() {
}
}

@Test
public void testWorkflowMethods() throws Exception {
var workflowId = workflowClient.startWorkflow(getStartWorkflowRequest());
var workflows = (List<Workflow>) TestUtil.retryMethodCall(
() -> workflowClient.getWorkflows(
Commons.WORKFLOW_NAME, "askdjbjqhbdjqhbdjqhsbdjqhsbd", false, false));
assertTrue(workflows.isEmpty());
TestUtil.retryMethodCall(
() -> workflowClient.terminateWorkflow(workflowId, "reason"));
TestUtil.retryMethodCall(
() -> workflowClient.retryLastFailedTask(workflowId));
TestUtil.retryMethodCall(
() -> workflowClient.getRunningWorkflow(Commons.WORKFLOW_NAME, Commons.WORKFLOW_VERSION));
TestUtil.retryMethodCall(
() -> workflowClient.getWorkflowsByTimePeriod(
Commons.WORKFLOW_NAME, Commons.WORKFLOW_VERSION, 0L, 0L));
TestUtil.retryMethodCall(
() -> workflowClient.search(2, 5, "", "", Commons.WORKFLOW_NAME));
TestUtil.retryMethodCall(
() -> workflowClient.terminateWorkflows(List.of(workflowId), "reason"));
TestUtil.retryMethodCall(
() -> workflowClient.restart(workflowId, true));
try {
TestUtil.retryMethodCall(
() -> workflowClient.skipTaskFromWorkflow(workflowId, Commons.TASK_NAME));
} catch (ApiException e) {
assertEquals(e.getCode(), "500");
}
TestUtil.retryMethodCall(
() -> workflowClient.terminateWorkflow(List.of(workflowId), "reason"));
TestUtil.retryMethodCall(
() -> workflowClient.restartWorkflow(List.of(workflowId), true));
TestUtil.retryMethodCall(
() -> workflowClient.terminateWorkflow(workflowId, "reason"));
TestUtil.retryMethodCall(
() -> workflowClient.retryWorkflow(List.of(workflowId)));
TestUtil.retryMethodCall(
() -> workflowClient.terminateWorkflow(workflowId, "reason"));
TestUtil.retryMethodCall(
() -> workflowClient.rerunWorkflow(workflowId, new RerunWorkflowRequest()));
TestUtil.retryMethodCall(
() -> workflowClient.pauseWorkflow(workflowId));
TestUtil.retryMethodCall(
() -> workflowClient.resumeWorkflow(workflowId));
TestUtil.retryMethodCall(
() -> workflowClient.pauseWorkflow(workflowId));
TestUtil.retryMethodCall(
() -> workflowClient.resumeWorkflow(workflowId));
TestUtil.retryMethodCall(
() -> workflowClient.pauseWorkflow(List.of(workflowId)));
TestUtil.retryMethodCall(
() -> workflowClient.resumeWorkflow(List.of(workflowId)));
TestUtil.retryMethodCall(
() -> workflowClient.deleteWorkflow(workflowId, false));
TestUtil.retryMethodCall(
() -> workflowClient.search(Commons.WORKFLOW_NAME));
TestUtil.retryMethodCall(
() -> workflowClient.runDecider(workflowId));
}

@Test
public void testWorkflowTerminate() {
String workflowId = workflowClient.startWorkflow(getStartWorkflowRequest());
Expand Down

0 comments on commit 94f88d1

Please sign in to comment.