diff --git a/masq/Cargo.toml b/masq/Cargo.toml index 87a20ad67..6a5e9e5aa 100644 --- a/masq/Cargo.toml +++ b/masq/Cargo.toml @@ -19,6 +19,7 @@ linefeed = "0.6.0" masq_lib = { path = "../masq_lib" } num = "0.4.0" regex = "1.5.4" +test_utilities = { path = "../test_utilities" } thousands = "0.2.0" websocket = {version = "0.26.2", default-features = false, features = ["sync"]} ctrlc = "3.2.1" diff --git a/masq/src/command_context.rs b/masq/src/command_context.rs index 41308e5bb..e648da218 100644 --- a/masq/src/command_context.rs +++ b/masq/src/command_context.rs @@ -156,12 +156,12 @@ mod tests { use crate::test_utils::mocks::TRANSACT_TIMEOUT_MILLIS_FOR_TESTS; use masq_lib::messages::{FromMessageBody, UiCrashRequest, UiSetupRequest}; use masq_lib::messages::{ToMessageBody, UiShutdownRequest, UiShutdownResponse}; - use masq_lib::test_utils::fake_stream_holder::{ByteArrayReader, ByteArrayWriter}; use masq_lib::test_utils::mock_websockets_server::MockWebSocketsServer; use masq_lib::ui_gateway::MessageBody; use masq_lib::ui_gateway::MessagePath::Conversation; use masq_lib::ui_traffic_converter::{TrafficConversionError, UnmarshalError}; use masq_lib::utils::{find_free_port, running_test}; + use test_utilities::byte_array_reader_writer::{ByteArrayReader, ByteArrayWriter}; #[test] fn constant_has_correct_values() { diff --git a/masq/src/interactive_mode.rs b/masq/src/interactive_mode.rs index a9141ffa5..026ed4aef 100644 --- a/masq/src/interactive_mode.rs +++ b/masq/src/interactive_mode.rs @@ -168,10 +168,11 @@ mod tests { CommandFactoryMock, CommandProcessorMock, TerminalActiveMock, TerminalPassiveMock, }; use crossbeam_channel::bounded; - use masq_lib::test_utils::fake_stream_holder::{ByteArrayWriter, FakeStreamHolder}; + use masq_lib::test_utils::fake_stream_holder::FakeStreamHolder; use std::sync::{Arc, Mutex}; use std::thread; use std::time::{Duration, Instant}; + use test_utilities::byte_array_reader_writer::ByteArrayWriter; #[test] fn interactive_mode_works_for_unrecognized_command() { diff --git a/masq/src/notifications/connection_change_notification.rs b/masq/src/notifications/connection_change_notification.rs index 9ea7d5911..0480660fb 100644 --- a/masq/src/notifications/connection_change_notification.rs +++ b/masq/src/notifications/connection_change_notification.rs @@ -34,9 +34,9 @@ impl ConnectionChangeNotification { mod tests { use super::*; use crate::test_utils::mocks::TerminalPassiveMock; - use masq_lib::test_utils::fake_stream_holder::ByteArrayWriter; use masq_lib::utils::running_test; use std::sync::Arc; + use test_utilities::byte_array_reader_writer::ByteArrayWriter; #[test] fn broadcasts_connected_to_neighbor() { diff --git a/masq/src/notifications/crashed_notification.rs b/masq/src/notifications/crashed_notification.rs index 36e0ff4f4..66dfc773c 100644 --- a/masq/src/notifications/crashed_notification.rs +++ b/masq/src/notifications/crashed_notification.rs @@ -63,9 +63,9 @@ impl CrashNotifier { mod tests { use super::*; use crate::test_utils::mocks::TerminalPassiveMock; - use masq_lib::test_utils::fake_stream_holder::ByteArrayWriter; use masq_lib::utils::running_test; use std::sync::Arc; + use test_utilities::byte_array_reader_writer::ByteArrayWriter; #[test] pub fn handles_child_wait_failure() { diff --git a/masq/src/terminal/integration_test_utils.rs b/masq/src/terminal/integration_test_utils.rs index 7f42f72f5..526e19a66 100644 --- a/masq/src/terminal/integration_test_utils.rs +++ b/masq/src/terminal/integration_test_utils.rs @@ -187,9 +187,9 @@ mod tests { use crate::terminal::terminal_interface::TerminalWrapper; use crate::test_utils::mocks::StdoutBlender; use crossbeam_channel::{bounded, unbounded}; - use masq_lib::test_utils::fake_stream_holder::ByteArrayReader; use std::thread; use std::time::Duration; + use test_utilities::byte_array_reader_writer::ByteArrayReader; #[test] fn constants_have_correct_values() { diff --git a/masq/src/test_utils/mocks.rs b/masq/src/test_utils/mocks.rs index 955fa578a..9f70b7e5b 100644 --- a/masq/src/test_utils/mocks.rs +++ b/masq/src/test_utils/mocks.rs @@ -15,7 +15,6 @@ use linefeed::memory::MemoryTerminal; use linefeed::{Interface, ReadResult, Signal}; use masq_lib::command::StdStreams; use masq_lib::constants::DEFAULT_UI_PORT; -use masq_lib::test_utils::fake_stream_holder::{ByteArrayWriter, ByteArrayWriterInner}; use masq_lib::ui_gateway::MessageBody; use std::cell::RefCell; use std::fmt::Arguments; @@ -23,6 +22,7 @@ use std::io::{Read, Write}; use std::sync::{Arc, Mutex}; use std::time::Duration; use std::{io, thread}; +use test_utilities::byte_array_reader_writer::{ByteArrayWriter, ByteArrayWriterInner}; pub const TRANSACT_TIMEOUT_MILLIS_FOR_TESTS: u64 = DEFAULT_TRANSACT_TIMEOUT_MILLIS; diff --git a/node/Cargo.lock b/node/Cargo.lock index 5bd327757..fabda2b8a 100644 --- a/node/Cargo.lock +++ b/node/Cargo.lock @@ -1855,6 +1855,7 @@ dependencies = [ "nix 0.23.1", "num", "regex", + "test_utilities", "thousands", "time 0.3.11", "websocket",