From a51b1d078cbac8cf6b21d802daf423addcf83869 Mon Sep 17 00:00:00 2001 From: George Mulhearn Date: Tue, 23 Jul 2024 13:37:55 +1000 Subject: [PATCH] use non blocking 2 Signed-off-by: George Mulhearn --- .../agents/mediator/tests/mediator-oob-invitation.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/aries/agents/mediator/tests/mediator-oob-invitation.rs b/aries/agents/mediator/tests/mediator-oob-invitation.rs index 7e8ff0e886..03b4b930b8 100644 --- a/aries/agents/mediator/tests/mediator-oob-invitation.rs +++ b/aries/agents/mediator/tests/mediator-oob-invitation.rs @@ -10,21 +10,22 @@ static LOGGING_INIT: std::sync::Once = std::sync::Once::new(); const ENDPOINT_ROOT: &str = "http://localhost:8005"; -#[test] -fn endpoint_invitation_returns_oob() -> Result<()> { +#[tokio::test] +async fn endpoint_invitation_returns_oob() -> Result<()> { LOGGING_INIT.call_once(setup_env_logging); - let client = reqwest::blocking::Client::new(); + let client = reqwest::Client::new(); let base: Url = ENDPOINT_ROOT.parse().unwrap(); let endpoint_register_json = base.join("/invitation").unwrap(); let res = client .get(endpoint_register_json) - .send()? + .send() + .await? .error_for_status()?; info!("{:?}", res); - let _oob: OOBInvitation = res.json()?; + let _oob: OOBInvitation = res.json().await?; Ok(()) }