diff --git a/temporal-sdk/src/test/java/io/temporal/workflow/updateTest/UpdateInfoTest.java b/temporal-sdk/src/test/java/io/temporal/workflow/updateTest/UpdateInfoTest.java index 1ede5bbfe..68b04083e 100644 --- a/temporal-sdk/src/test/java/io/temporal/workflow/updateTest/UpdateInfoTest.java +++ b/temporal-sdk/src/test/java/io/temporal/workflow/updateTest/UpdateInfoTest.java @@ -56,7 +56,7 @@ public void testUpdateInfo() throws ExecutionException, InterruptedException { // return. WorkflowExecution execution = WorkflowClient.start(workflow::execute); WorkflowStub stub = WorkflowStub.fromTyped(workflow); - UpdateOptions.Builder updateOptionsBuilder = + UpdateOptions.Builder updateOptionsBuilder = UpdateOptions.newBuilder(String.class) .setUpdateName("update") .setWaitForStage(WorkflowUpdateStage.COMPLETED); @@ -71,7 +71,9 @@ public void testUpdateInfo() throws ExecutionException, InterruptedException { Assert.assertThrows( WorkflowUpdateException.class, - () -> stub.startUpdate(updateOptionsBuilder.setUpdateId("reject").build(), 0, "")); + () -> + stub.startUpdate(updateOptionsBuilder.setUpdateId("reject").build(), 0, "") + .getResultAsync()); workflow.complete(); String result = @@ -112,7 +114,7 @@ public String update(Integer index, String value) { @Override public void updateValidator(Integer index, String value) { UpdateInfo updateInfo = Workflow.getCurrentUpdateInfo().get(); - if (updateInfo.getUpdateId() == "reject") { + if (updateInfo.getUpdateId().equals("reject")) { throw new RuntimeException("Rejecting update"); } }