Skip to content

Commit e6b7c7d

Browse files
Update KillTest
1 parent 64a5d4e commit e6b7c7d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test-services/src/main/kotlin/dev/restate/sdk/testservices/KillTestImpl.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ class KillTestImpl {
2222
// This will ensure that we have a call tree that is two calls deep and has a pending invocation
2323
// in the inbox:
2424
// startCallTree --> recursiveCall --> recursiveCall:inboxed
25-
override suspend fun startCallTree(context: Context) {
26-
KillTestSingletonClient.fromContext(context, "").recursiveCall().await()
25+
override suspend fun startCallTree(context: ObjectContext) {
26+
KillTestSingletonClient.fromContext(context, context.key()).recursiveCall().await()
2727
}
2828
}
2929

3030
class SingletonImpl : KillTest.Singleton {
3131
override suspend fun recursiveCall(context: ObjectContext) {
3232
val awakeable = context.awakeable(Serde.RAW)
33-
AwakeableHolderClient.fromContext(context, "kill").send().hold(awakeable.id)
33+
AwakeableHolderClient.fromContext(context, context.key()).send().hold(awakeable.id)
3434

3535
awakeable.await()
3636

37-
KillTestSingletonClient.fromContext(context, "").recursiveCall().await()
37+
KillTestSingletonClient.fromContext(context, context.key()).recursiveCall().await()
3838
}
3939

4040
override suspend fun isUnlocked(context: ObjectContext) {

test-services/src/main/kotlin/dev/restate/sdk/testservices/contracts/KillTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import dev.restate.sdk.kotlin.Context
1313
import dev.restate.sdk.kotlin.ObjectContext
1414

1515
interface KillTest {
16-
@Service(name = "KillTestRunner")
16+
@VirtualObject(name = "KillTestRunner")
1717
interface Runner {
18-
@Handler suspend fun startCallTree(context: Context)
18+
@Handler suspend fun startCallTree(context: ObjectContext)
1919
}
2020

2121
@VirtualObject(name = "KillTestSingleton")

0 commit comments

Comments
 (0)