diff --git a/src/main/kotlin/dev/restate/sdktesting/tests/CancelInvocation.kt b/src/main/kotlin/dev/restate/sdktesting/tests/CancelInvocation.kt index e6936d7..8c464ac 100644 --- a/src/main/kotlin/dev/restate/sdktesting/tests/CancelInvocation.kt +++ b/src/main/kotlin/dev/restate/sdktesting/tests/CancelInvocation.kt @@ -65,7 +65,7 @@ class CancelInvocation { // The termination signal might arrive before the blocking call to the cancel singleton was // made, so we need to retry. - await.ignoreException(TimeoutCancellationException::class.java) withAlias + await withAlias "verify test" untilAsserted { client.terminateInvocation(id, TerminationMode.CANCEL) diff --git a/src/main/kotlin/dev/restate/sdktesting/tests/KillInvocation.kt b/src/main/kotlin/dev/restate/sdktesting/tests/KillInvocation.kt index b650deb..9c7f0aa 100644 --- a/src/main/kotlin/dev/restate/sdktesting/tests/KillInvocation.kt +++ b/src/main/kotlin/dev/restate/sdktesting/tests/KillInvocation.kt @@ -54,7 +54,14 @@ class KillInvocation { // Kill the invocation val client = InvocationApi(ApiClient().setHost(metaURL.host).setPort(metaURL.port)) - client.terminateInvocation(id, TerminationMode.KILL) + + // The termination signal might arrive before the blocking call to the cancel singleton was + // made, so we need to retry. + await withAlias + "verify test" untilAsserted + { + client.terminateInvocation(id, TerminationMode.KILL) + } await withAlias "singleton service is unlocked after killing the call tree" untilAsserted