mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-20 05:16:35 +00:00
* 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:
committed by
Pierre Krieger
parent
4a894851ab
commit
490ae980c7
@ -646,8 +646,9 @@ where ::hmac::Hmac<D>: Clone {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
extern crate tokio_current_thread;
|
||||
extern crate tokio;
|
||||
extern crate tokio_tcp;
|
||||
use self::tokio::runtime::current_thread::Runtime;
|
||||
use self::tokio_tcp::TcpListener;
|
||||
use self::tokio_tcp::TcpStream;
|
||||
use super::handshake;
|
||||
@ -712,8 +713,8 @@ mod tests {
|
||||
let client = TcpStream::connect(&listener_addr)
|
||||
.map_err(|e| e.into())
|
||||
.and_then(move |stream| handshake(stream, key2));
|
||||
|
||||
tokio_current_thread::block_on_all(server.join(client)).unwrap();
|
||||
let mut rt = Runtime::new().unwrap();
|
||||
let _ = rt.block_on(server.join(client)).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user