From bd53e18aa9dad2941acad72267ad31b7eb3ee8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Mon, 16 Mar 2020 13:24:54 +0100 Subject: [PATCH] Cargo.toml: Use the tokio async test macro. --- Cargo.toml | 3 +-- src/crypto/machine.rs | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 732af500..3c4f8640 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,6 @@ cjson = { version = "0.1.0", optional = true } tokio = { version = "0.2.13", default-features = false, features = ["sync"] } [dev-dependencies] -tokio = { version = "0.2.13", features = ["full"] } -async-std = { version = "1.5.0", features = ["unstable", "attributes"] } +tokio = { version = "0.2.13", features = ["rt-threaded", "macros"] } url = "2.1.1" mockito = "0.23.3" diff --git a/src/crypto/machine.rs b/src/crypto/machine.rs index 847c7387..32fc45f7 100644 --- a/src/crypto/machine.rs +++ b/src/crypto/machine.rs @@ -414,7 +414,7 @@ mod test { assert!(machine.should_upload_keys()); } - #[async_std::test] + #[tokio::test] async fn receive_keys_upload_response() { let mut machine = OlmMachine::new(&user_id(), DEVICE_ID); let mut response = keys_upload_response(); @@ -443,7 +443,7 @@ mod test { assert!(!machine.should_upload_keys()); } - #[async_std::test] + #[tokio::test] async fn generate_one_time_keys() { let mut machine = OlmMachine::new(&user_id(), DEVICE_ID); @@ -516,7 +516,7 @@ mod test { assert!(ret.is_ok()); } - #[async_std::test] + #[tokio::test] async fn test_keys_for_upload() { let mut machine = OlmMachine::new(&user_id(), DEVICE_ID); machine.uploaded_signed_key_count = Some(0);