diff --git a/core/src/lib.rs b/core/src/lib.rs index baaa1d3d9..56af34c8a 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -30,7 +30,6 @@ pub mod blocktree_processor; pub mod cluster; pub mod cluster_info; pub mod cluster_info_repair_listener; -pub mod cluster_tests; pub mod consensus; pub mod cuda_runtime; pub mod entry; diff --git a/core/src/cluster_tests.rs b/local_cluster/src/cluster_tests.rs similarity index 92% rename from core/src/cluster_tests.rs rename to local_cluster/src/cluster_tests.rs index 650ec5a25..44a4a6bf0 100644 --- a/core/src/cluster_tests.rs +++ b/local_cluster/src/cluster_tests.rs @@ -1,30 +1,31 @@ -use crate::blocktree::Blocktree; /// Cluster independant integration tests /// /// All tests must start from an entry point and a funding keypair and /// discover the rest of the network. -use crate::cluster_info::FULLNODE_PORT_RANGE; -use crate::consensus::VOTE_THRESHOLD_DEPTH; -use crate::contact_info::ContactInfo; -use crate::entry::{Entry, EntrySlice}; -use crate::gossip_service::discover_cluster; +use solana::{ + blocktree::Blocktree, + cluster_info::FULLNODE_PORT_RANGE, + consensus::VOTE_THRESHOLD_DEPTH, + contact_info::ContactInfo, + entry::{Entry, EntrySlice}, + gossip_service::discover_cluster, +}; use solana_client::thin_client::create_client; use solana_runtime::epoch_schedule::MINIMUM_SLOTS_PER_EPOCH; -use solana_sdk::client::SyncClient; -use solana_sdk::hash::Hash; -use solana_sdk::poh_config::PohConfig; -use solana_sdk::pubkey::Pubkey; -use solana_sdk::signature::{Keypair, KeypairUtil, Signature}; -use solana_sdk::system_transaction; -use solana_sdk::timing::{ - duration_as_ms, DEFAULT_NUM_TICKS_PER_SECOND, DEFAULT_TICKS_PER_SLOT, - NUM_CONSECUTIVE_LEADER_SLOTS, +use solana_sdk::{ + client::SyncClient, + hash::Hash, + poh_config::PohConfig, + pubkey::Pubkey, + signature::{Keypair, KeypairUtil, Signature}, + system_transaction, + timing::{ + duration_as_ms, DEFAULT_NUM_TICKS_PER_SECOND, DEFAULT_TICKS_PER_SLOT, + NUM_CONSECUTIVE_LEADER_SLOTS, + }, + transport::TransportError, }; -use solana_sdk::transport::TransportError; -use std::collections::HashSet; -use std::path::Path; -use std::thread::sleep; -use std::time::Duration; +use std::{collections::HashSet, path::Path, thread::sleep, time::Duration}; const DEFAULT_SLOT_MILLIS: u64 = (DEFAULT_TICKS_PER_SLOT * 1000) / DEFAULT_NUM_TICKS_PER_SECOND; diff --git a/local_cluster/src/lib.rs b/local_cluster/src/lib.rs index 1774758b1..ea1e8595f 100644 --- a/local_cluster/src/lib.rs +++ b/local_cluster/src/lib.rs @@ -1,3 +1,4 @@ +pub mod cluster_tests; pub mod local_cluster; #[macro_use] diff --git a/local_cluster/tests/local_cluster.rs b/local_cluster/tests/local_cluster.rs index dc3917f57..9047d1d96 100644 --- a/local_cluster/tests/local_cluster.rs +++ b/local_cluster/tests/local_cluster.rs @@ -2,20 +2,17 @@ extern crate solana; use log::*; use serial_test_derive::serial; -use solana::blocktree::Blocktree; -use solana::broadcast_stage::BroadcastStageType; -use solana::cluster::Cluster; -use solana::cluster_tests; -use solana::gossip_service::discover_cluster; -use solana::validator::ValidatorConfig; -use solana_local_cluster::local_cluster::{ClusterConfig, LocalCluster}; +use solana::{ + blocktree::Blocktree, broadcast_stage::BroadcastStageType, cluster::Cluster, + gossip_service::discover_cluster, validator::ValidatorConfig, +}; +use solana_local_cluster::{ + cluster_tests, + local_cluster::{ClusterConfig, LocalCluster}, +}; use solana_runtime::epoch_schedule::{EpochSchedule, MINIMUM_SLOTS_PER_EPOCH}; -use solana_sdk::client::SyncClient; -use solana_sdk::poh_config::PohConfig; -use solana_sdk::timing; -use std::collections::HashSet; -use std::thread::sleep; -use std::time::Duration; +use solana_sdk::{client::SyncClient, poh_config::PohConfig, timing}; +use std::{collections::HashSet, thread::sleep, time::Duration}; #[test] #[serial]