Skip to content

Commit 9dfd571

Browse files
authored
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.
1 parent 9576c25 commit 9dfd571

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

juniper_rocket_async/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ futures = "0.3.1"
1616
juniper = { version = "0.15.4", path = "../juniper", default-features = false }
1717
rocket = { git = "https://github.com/SergioBenitez/Rocket", branch = "master", default-features = false }
1818
serde_json = "1.0.2"
19-
tokio = { version = "1", features = ["macros", "rt"] }
2019

2120
[dev-dependencies]
2221
juniper = { version = "0.15.4", path = "../juniper", features = ["expose-test-schema"] }

juniper_rocket_async/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ mod tests {
572572
}
573573
}
574574

575-
#[tokio::test]
575+
#[rocket::async_test]
576576
async fn test_rocket_integration() {
577577
let rocket = make_rocket();
578578
let client = Client::untracked(rocket).await.expect("valid rocket");
@@ -581,7 +581,7 @@ mod tests {
581581
http_tests::run_http_test_suite(&integration);
582582
}
583583

584-
#[tokio::test]
584+
#[rocket::async_test]
585585
async fn test_operation_names() {
586586
#[post("/", data = "<request>")]
587587
fn post_graphql_assert_operation_name_handler(

0 commit comments

Comments
 (0)