Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'com.jayway.jsonpath:json-path:2.6.0'
implementation 'info.picocli:picocli:4.6.2'
implementation 'io.temporal:temporal-sdk:1.25.0'
implementation 'io.temporal:temporal-sdk:1.26.1'
implementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
implementation 'org.reflections:reflections:0.10.2'
}
Expand Down
11 changes: 6 additions & 5 deletions features/update/async_accepted/feature.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package update.async_accepted;

import io.temporal.activity.ActivityInterface;
import io.temporal.client.UpdateHandle;
import io.temporal.client.UpdateOptions;
import io.temporal.client.WorkflowUpdateException;
import io.temporal.client.WorkflowUpdateHandle;
import io.temporal.client.WorkflowUpdateStage;
import io.temporal.client.WorkflowUpdateTimeoutOrCancelledException;
import io.temporal.failure.ApplicationFailure;
Expand Down Expand Up @@ -71,7 +71,7 @@ public Run execute(Runner runner) throws Exception {

// Issue an async update that should succeed after SLEEP_TIMEOUT
var updateId = UUID.randomUUID().toString();
UpdateHandle<Integer> handle =
WorkflowUpdateHandle<Integer> handle =
untypedStub.startUpdate(
UpdateOptions.newBuilder(Integer.class)
.setUpdateName("update")
Expand All @@ -82,7 +82,8 @@ public Run execute(Runner runner) throws Exception {
true);

// Create a separate handle to the same update
UpdateHandle<Integer> otherHandle = untypedStub.getUpdateHandle(updateId, Integer.class);
WorkflowUpdateHandle<Integer> otherHandle =
untypedStub.getUpdateHandle(updateId, Integer.class);
// should block on in-flight update
Assertions.assertEquals(UPDATE_RESULT, otherHandle.getResultAsync().get());
Assertions.assertEquals(UPDATE_RESULT, handle.getResultAsync().get());
Expand All @@ -93,7 +94,7 @@ public Run execute(Runner runner) throws Exception {
// the update will be marked as failed and the exception may be thrown
// from startUpdate. This is not consistent with the behavior of the
// other SDKs.
UpdateHandle<Integer> errorHandle =
WorkflowUpdateHandle<Integer> errorHandle =
untypedStub.startUpdate(
UpdateOptions.newBuilder(Integer.class)
.setUpdateName("update")
Expand All @@ -118,7 +119,7 @@ public Run execute(Runner runner) throws Exception {
}
// issue an update that will succeed after `requestedSleep`
updateId = UUID.randomUUID().toString();
UpdateHandle<Integer> timeoutHandle =
WorkflowUpdateHandle<Integer> timeoutHandle =
untypedStub.startUpdate(
UpdateOptions.newBuilder(Integer.class)
.setUpdateName("update")
Expand Down
4 changes: 2 additions & 2 deletions features/update/client_interceptor/feature.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package update.client_interceptor;

import io.temporal.client.UpdateHandle;
import io.temporal.client.WorkflowClientOptions;
import io.temporal.client.WorkflowUpdateHandle;
import io.temporal.common.interceptors.WorkflowClientCallsInterceptor;
import io.temporal.common.interceptors.WorkflowClientCallsInterceptorBase;
import io.temporal.common.interceptors.WorkflowClientInterceptorBase;
Expand Down Expand Up @@ -54,7 +54,7 @@ public WorkflowClientCallsInterceptor workflowClientCallsInterceptor(
WorkflowClientCallsInterceptor next) {
return new WorkflowClientCallsInterceptorBase(next) {
@Override
public <R> UpdateHandle<R> startUpdate(StartUpdateInput<R> input) {
public <R> WorkflowUpdateHandle<R> startUpdate(StartUpdateInput<R> input) {
if (input.getUpdateName() == "update") {
input.getArguments()[0] = ((int) input.getArguments()[0]) + 1;
}
Expand Down
6 changes: 3 additions & 3 deletions features/update/deduplication/feature.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package update.deduplication;

import io.temporal.client.UpdateHandle;
import io.temporal.client.UpdateOptions;
import io.temporal.client.WorkflowUpdateHandle;
import io.temporal.client.WorkflowUpdateStage;
import io.temporal.sdkfeatures.Feature;
import io.temporal.sdkfeatures.Run;
Expand Down Expand Up @@ -76,8 +76,8 @@ public Run execute(Runner runner) throws Exception {
.setFirstExecutionRunId(run.execution.getRunId())
.build();

UpdateHandle<Integer> handle1 = untypedStub.startUpdate(updateOptions);
UpdateHandle<Integer> handle2 = untypedStub.startUpdate(updateOptions);
WorkflowUpdateHandle<Integer> handle1 = untypedStub.startUpdate(updateOptions);
WorkflowUpdateHandle<Integer> handle2 = untypedStub.startUpdate(updateOptions);

Assertions.assertEquals(1, handle1.getResultAsync().get());
Assertions.assertEquals(1, handle2.getResultAsync().get());
Expand Down