From 9dfd57198d0c890bc3980496c65cb8fedfc9ad17 Mon Sep 17 00:00:00 2001 From: Filip Gospodinov Date: Mon, 19 Apr 2021 19:54:21 +0200 Subject: [PATCH] Eliminate tokio dependency in juniper_rocket_async (#920) The `tokio` dependency is only required for tests and should have been in the `dev-dependencies` section in `Cargo.toml`. Since `rocket` already ships with a async test annotation `tokio` can be removed completely. --- juniper_rocket_async/Cargo.toml | 1 - juniper_rocket_async/src/lib.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/juniper_rocket_async/Cargo.toml b/juniper_rocket_async/Cargo.toml index b876631b..92f673c4 100644 --- a/juniper_rocket_async/Cargo.toml +++ b/juniper_rocket_async/Cargo.toml @@ -16,7 +16,6 @@ futures = "0.3.1" juniper = { version = "0.15.4", path = "../juniper", default-features = false } rocket = { git = "https://github.com/SergioBenitez/Rocket", branch = "master", default-features = false } serde_json = "1.0.2" -tokio = { version = "1", features = ["macros", "rt"] } [dev-dependencies] juniper = { version = "0.15.4", path = "../juniper", features = ["expose-test-schema"] } diff --git a/juniper_rocket_async/src/lib.rs b/juniper_rocket_async/src/lib.rs index 9a9ffdd0..fff2c6db 100644 --- a/juniper_rocket_async/src/lib.rs +++ b/juniper_rocket_async/src/lib.rs @@ -572,7 +572,7 @@ mod tests { } } - #[tokio::test] + #[rocket::async_test] async fn test_rocket_integration() { let rocket = make_rocket(); let client = Client::untracked(rocket).await.expect("valid rocket"); @@ -581,7 +581,7 @@ mod tests { http_tests::run_http_test_suite(&integration); } - #[tokio::test] + #[rocket::async_test] async fn test_operation_names() { #[post("/", data = "")] fn post_graphql_assert_operation_name_handler(