#399 remove tokio_current_thread tests (#577)

* remove tokio_current_thread tests

* Review changes:
Removed newline
Moved uds tokio test crate to top to avoid self and keep with convention of other test crates
Removed sleep from uds test and block until all futures are completed.
This commit is contained in:
jamartin9
2018-10-25 05:26:37 -04:00
committed by Pierre Krieger
parent 4a894851ab
commit 490ae980c7
27 changed files with 117 additions and 82 deletions

View File

@ -45,7 +45,7 @@
//! extern crate bytes;
//! extern crate futures;
//! extern crate multistream_select;
//! extern crate tokio_current_thread;
//! extern crate tokio;
//! extern crate tokio_tcp;
//!
//! # fn main() {
@ -53,6 +53,7 @@
//! use multistream_select::dialer_select_proto;
//! use futures::{Future, Sink, Stream};
//! use tokio_tcp::TcpStream;
//! use tokio::runtime::current_thread::Runtime;
//!
//! #[derive(Debug, Copy, Clone)]
//! enum MyProto { Echo, Hello }
@ -68,7 +69,8 @@
//! dialer_select_proto(connec, protos).map(|r| r.0)
//! });
//!
//! let negotiated_protocol: MyProto = tokio_current_thread::block_on_all(client)
//! let mut rt = Runtime::new().unwrap();
//! let negotiated_protocol: MyProto = rt.block_on(client)
//! .expect("failed to find a protocol");
//! println!("negotiated: {:?}", negotiated_protocol);
//! # }
@ -80,7 +82,7 @@
//! extern crate bytes;
//! extern crate futures;
//! extern crate multistream_select;
//! extern crate tokio_current_thread;
//! extern crate tokio;
//! extern crate tokio_tcp;
//!
//! # fn main() {
@ -88,6 +90,7 @@
//! use multistream_select::listener_select_proto;
//! use futures::{Future, Sink, Stream};
//! use tokio_tcp::TcpListener;
//! use tokio::runtime::current_thread::Runtime;
//!
//! #[derive(Debug, Copy, Clone)]
//! enum MyProto { Echo, Hello }
@ -108,7 +111,8 @@
//! Ok(())
//! });
//!
//! tokio_current_thread::block_on_all(server).expect("failed to run server");
//! let mut rt = Runtime::new().unwrap();
//! let _ = rt.block_on(server).expect("failed to run server");
//! # }
//! ```