From dfbf3ce52a7914f621483098e00ad78b60464538 Mon Sep 17 00:00:00 2001 From: "ChenYing Kuo (CY)" Date: Thu, 1 Aug 2024 14:06:41 +0800 Subject: [PATCH] Bump up-rust to 0.1.5 (#64) Signed-off-by: ChenYing Kuo --- Cargo.toml | 2 +- tests/l2_rpc.rs | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9a98d2d..e6b6e7c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,7 @@ rand = "0.8.5" tokio = { version = "1.35.1", default-features = false } tracing = "0.1.40" tracing-subscriber = "0.3.18" -up-rust = "0.1.3" +up-rust = "0.1.5" zenoh = { version = "0.11.0", features = ["unstable"]} [dev-dependencies] diff --git a/tests/l2_rpc.rs b/tests/l2_rpc.rs index d6952ac..026d62d 100644 --- a/tests/l2_rpc.rs +++ b/tests/l2_rpc.rs @@ -12,14 +12,14 @@ ********************************************************************************/ pub mod test_lib; -use std::{str::FromStr, sync::Arc}; +use std::sync::Arc; use tokio::time::{sleep, Duration}; use up_rust::{ communication::{ CallOptions, InMemoryRpcServer, RequestHandler, RpcClient, RpcServer, ServiceInvocationError, UPayload, }, - LocalUriProvider, UPayloadFormat, UUri, + LocalUriProvider, UPayloadFormat, }; use up_transport_zenoh::ZenohRpcClient; @@ -39,7 +39,7 @@ impl ExampleHandler { } #[async_trait::async_trait] impl RequestHandler for ExampleHandler { - async fn invoke_method( + async fn handle_request( &self, _resource_id: u16, request_payload: Option, @@ -81,13 +81,8 @@ async fn test_l2_rpc() { request_data.clone(), response_data.clone(), )); - // CY_TODO: Verify the what kind of resource_id we can listen to rpc_server - .register_endpoint( - Some(&UUri::from_str("//*/FFFF/FF/0").unwrap()), - METHOD_RESOURCE_ID, - example_handler.clone(), - ) + .register_endpoint(None, METHOD_RESOURCE_ID, example_handler.clone()) .await .unwrap(); // Need some time for queryable to run