Skip to content

Commit eab3ad5

Browse files
For now revert the changes to the test services to run once the integration tests
1 parent 76193c1 commit eab3ad5

File tree

2 files changed

+8
-22
lines changed

2 files changed

+8
-22
lines changed

test-services/src/proxy.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub(crate) trait Proxy {
4646
#[name = "call"]
4747
async fn call(req: Json<ProxyRequest>) -> HandlerResult<Json<Vec<u8>>>;
4848
#[name = "oneWayCall"]
49-
async fn one_way_call(req: Json<ProxyRequest>) -> HandlerResult<String>;
49+
async fn one_way_call(req: Json<ProxyRequest>) -> HandlerResult<()>;
5050
#[name = "manyCalls"]
5151
async fn many_calls(req: Json<Vec<ManyCallRequest>>) -> HandlerResult<()>;
5252
}
@@ -70,19 +70,16 @@ impl Proxy for ProxyImpl {
7070
&self,
7171
ctx: Context<'_>,
7272
Json(req): Json<ProxyRequest>,
73-
) -> HandlerResult<String> {
73+
) -> HandlerResult<()> {
7474
let request = ctx.request::<_, ()>(req.to_target(), req.message);
7575

76-
let invocation_id = if let Some(delay_millis) = req.delay_millis {
77-
request
78-
.send_after(Duration::from_millis(delay_millis))
79-
.invocation_id()
80-
.await?
76+
if let Some(delay_millis) = req.delay_millis {
77+
request.send_with_delay(Duration::from_millis(delay_millis));
8178
} else {
82-
request.send().invocation_id().await?
83-
};
79+
request.send();
80+
}
8481

85-
Ok(invocation_id)
82+
Ok(())
8683
}
8784

8885
async fn many_calls(
@@ -97,7 +94,7 @@ impl Proxy for ProxyImpl {
9794
ctx.request::<_, Vec<u8>>(req.proxy_request.to_target(), req.proxy_request.message);
9895
if req.one_way_call {
9996
if let Some(delay_millis) = req.proxy_request.delay_millis {
100-
restate_req.send_after(Duration::from_millis(delay_millis));
97+
restate_req.send_with_delay(Duration::from_millis(delay_millis));
10198
} else {
10299
restate_req.send();
103100
}

test-services/src/test_utils_service.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ pub(crate) trait TestUtilsService {
6262
async fn count_executed_side_effects(increments: u32) -> HandlerResult<u32>;
6363
#[name = "getEnvVariable"]
6464
async fn get_env_variable(env: String) -> HandlerResult<String>;
65-
#[name = "cancelInvocation"]
66-
async fn cancel_invocation(invocation_id: String) -> Result<(), TerminalError>;
6765
#[name = "interpretCommands"]
6866
async fn interpret_commands(req: Json<InterpretRequest>) -> HandlerResult<()>;
6967
}
@@ -157,15 +155,6 @@ impl TestUtilsService for TestUtilsServiceImpl {
157155
Ok(std::env::var(env).ok().unwrap_or_default())
158156
}
159157

160-
async fn cancel_invocation(
161-
&self,
162-
ctx: Context<'_>,
163-
invocation_id: String,
164-
) -> Result<(), TerminalError> {
165-
ctx.invocation_handle(invocation_id).cancel().await?;
166-
Ok(())
167-
}
168-
169158
async fn interpret_commands(
170159
&self,
171160
context: Context<'_>,

0 commit comments

Comments
 (0)