From ee1da0999654e4b7e5d7010b9b34b5a818e37246 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Wed, 17 Jan 2018 10:36:12 +0100 Subject: [PATCH] Network tests moved to a tests directory (#7583) --- util/network/src/lib.rs | 3 --- util/network/{src => tests}/tests.rs | 13 +++++++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) rename util/network/{src => tests}/tests.rs (96%) diff --git a/util/network/src/lib.rs b/util/network/src/lib.rs index f31da60d9..2686b61fc 100644 --- a/util/network/src/lib.rs +++ b/util/network/src/lib.rs @@ -107,9 +107,6 @@ mod stats; mod ip_utils; mod connection_filter; -#[cfg(test)] -mod tests; - pub use host::{HostInfo, PeerId, PacketId, ProtocolId, NetworkContext, NetworkIoMessage, NetworkConfiguration}; pub use service::NetworkService; pub use error::{Error, ErrorKind}; diff --git a/util/network/src/tests.rs b/util/network/tests/tests.rs similarity index 96% rename from util/network/src/tests.rs rename to util/network/tests/tests.rs index bf0e08623..969e1a469 100644 --- a/util/network/src/tests.rs +++ b/util/network/tests/tests.rs @@ -14,15 +14,24 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -use super::*; +#[macro_use] +extern crate log; +extern crate parking_lot; +extern crate ethcore_bytes; +extern crate ethcore_io as io; +extern crate ethcore_logger; +extern crate ethcore_network; +extern crate ethkey; + use std::sync::atomic::{AtomicBool, Ordering as AtomicOrdering}; use std::sync::Arc; use std::thread; use std::time::*; use parking_lot::Mutex; use ethcore_bytes::Bytes; -use io::TimerToken; +use ethcore_network::*; use ethkey::{Random, Generator}; +use io::TimerToken; pub struct TestProtocol { drop_session: bool,