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
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ public class TerminalException extends RuntimeException {
private final int code;

public TerminalException() {
this.code = INTERNAL_SERVER_ERROR_CODE;
this(INTERNAL_SERVER_ERROR_CODE);
}

/** Like {@link #TerminalException(int, String)}, without message. */
public TerminalException(int code) {
this.code = code;
this(code, "Error " + code);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,7 @@ public CompletableFuture<AsyncResult<String>> send(
int sendHandle =
this.stateMachine.send(target, parameter, idempotencyKey, headers, delay);

AsyncResultInternal<String> invocationIdAsyncResult =
AsyncResults.single(this, sendHandle, invocationIdCompleter());
this.invocationIdsToCancel.add(invocationIdAsyncResult);

return invocationIdAsyncResult;
return AsyncResults.single(this, sendHandle, invocationIdCompleter());
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CancelTestImpl {
}

override suspend fun startTest(context: ObjectContext, operation: BlockingOperation) {
val client = CancelTestBlockingServiceClient.fromContext(context, "")
val client = CancelTestBlockingServiceClient.fromContext(context, context.key())

try {
client.block(operation).await()
Expand All @@ -44,8 +44,8 @@ class CancelTestImpl {

class BlockingService : CancelTest.BlockingService {
override suspend fun block(context: ObjectContext, operation: BlockingOperation) {
val self = CancelTestBlockingServiceClient.fromContext(context, "")
val client = AwakeableHolderClient.fromContext(context, "cancel")
val self = CancelTestBlockingServiceClient.fromContext(context, context.key())
val client = AwakeableHolderClient.fromContext(context, context.key())

val awakeable = context.awakeable<String>()
client.hold(awakeable.id).await()
Expand Down
Loading