Skip to content

Commit

Permalink
Bump up-rust to 0.1.5 (#64)
Browse files Browse the repository at this point in the history
Signed-off-by: ChenYing Kuo <[email protected]>
  • Loading branch information
evshary authored Aug 1, 2024
1 parent eb0e3e9 commit dfbf3ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
13 changes: 4 additions & 9 deletions tests/l2_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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<UPayload>,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dfbf3ce

Please sign in to comment.