diff --git a/Cargo.toml b/Cargo.toml index b77bf9ba4..9592e5cea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,7 @@ tokio-reactor = "0.1" env_logger = { version = "0.4", default-features = false } log = "0.4" tokio = "0.1" +tokio-current-thread = "0.1" [target.'cfg(windows)'.dependencies] mio-named-pipes = "0.1" diff --git a/tests/smoke.rs b/tests/smoke.rs index 8aff3877a..e14a59429 100644 --- a/tests/smoke.rs +++ b/tests/smoke.rs @@ -1,7 +1,6 @@ -extern crate tokio; +extern crate tokio_current_thread; extern crate tokio_process; -use tokio::executor::current_thread; use tokio_process::CommandExt; mod support; @@ -16,7 +15,7 @@ fn simple() { let id = child.id(); assert!(id > 0); - let status = current_thread::block_on_all(&mut child).unwrap(); + let status = tokio_current_thread::block_on_all(&mut child).unwrap(); assert_eq!(status.code(), Some(2)); assert_eq!(child.id(), id); diff --git a/tests/stdio.rs b/tests/stdio.rs index ea39bceb5..045d127b3 100644 --- a/tests/stdio.rs +++ b/tests/stdio.rs @@ -1,5 +1,6 @@ extern crate futures; extern crate tokio; +extern crate tokio_current_thread; extern crate tokio_io; extern crate tokio_process; #[macro_use] @@ -9,14 +10,12 @@ extern crate env_logger; use std::io; use std::process::{Stdio, ExitStatus, Command}; use std::time::Duration; -use std::time::Instant; use futures::future::Future; use futures::stream::{self, Stream}; -use tokio::executor::current_thread; use tokio_io::io::{read_until, write_all, read_to_end}; use tokio_process::{CommandExt, Child}; -use tokio::timer::Deadline; +use tokio::timer::Timeout; mod support; @@ -87,7 +86,7 @@ fn feed_cat(mut cat: Child, n: usize) -> Box