Skip to content

Update test suite #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2025
Merged
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
10 changes: 5 additions & 5 deletions test-services/src/kill_test.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::awakeable_holder;
use restate_sdk::prelude::*;

#[restate_sdk::service]
#[restate_sdk::object]
#[name = "KillTestRunner"]
pub(crate) trait KillTestRunner {
#[name = "startCallTree"]
Expand All @@ -11,9 +11,9 @@ pub(crate) trait KillTestRunner {
pub(crate) struct KillTestRunnerImpl;

impl KillTestRunner for KillTestRunnerImpl {
async fn start_call_tree(&self, context: Context<'_>) -> HandlerResult<()> {
async fn start_call_tree(&self, context: ObjectContext<'_>) -> HandlerResult<()> {
context
.object_client::<KillTestSingletonClient>("")
.object_client::<KillTestSingletonClient>(context.key())
.recursive_call()
.call()
.await?;
Expand All @@ -35,14 +35,14 @@ pub(crate) struct KillTestSingletonImpl;
impl KillTestSingleton for KillTestSingletonImpl {
async fn recursive_call(&self, context: ObjectContext<'_>) -> HandlerResult<()> {
let awakeable_holder_client =
context.object_client::<awakeable_holder::AwakeableHolderClient>("kill");
context.object_client::<awakeable_holder::AwakeableHolderClient>(context.key());

let (awk_id, awakeable) = context.awakeable::<()>();
awakeable_holder_client.hold(awk_id).send();
awakeable.await?;

context
.object_client::<KillTestSingletonClient>("")
.object_client::<KillTestSingletonClient>(context.key())
.recursive_call()
.call()
.await?;
Expand Down