move the rest of cluster to local_cluster (#5535)

This commit is contained in:
Rob Walker 2019-08-16 00:00:38 -07:00 committed by GitHub
parent ff95f6dcfa
commit 99eeb63f71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 34 deletions

View File

@ -30,7 +30,6 @@ pub mod blocktree_processor;
pub mod cluster; pub mod cluster;
pub mod cluster_info; pub mod cluster_info;
pub mod cluster_info_repair_listener; pub mod cluster_info_repair_listener;
pub mod cluster_tests;
pub mod consensus; pub mod consensus;
pub mod cuda_runtime; pub mod cuda_runtime;
pub mod entry; pub mod entry;

View File

@ -1,30 +1,31 @@
use crate::blocktree::Blocktree;
/// Cluster independant integration tests /// Cluster independant integration tests
/// ///
/// All tests must start from an entry point and a funding keypair and /// All tests must start from an entry point and a funding keypair and
/// discover the rest of the network. /// discover the rest of the network.
use crate::cluster_info::FULLNODE_PORT_RANGE; use solana::{
use crate::consensus::VOTE_THRESHOLD_DEPTH; blocktree::Blocktree,
use crate::contact_info::ContactInfo; cluster_info::FULLNODE_PORT_RANGE,
use crate::entry::{Entry, EntrySlice}; consensus::VOTE_THRESHOLD_DEPTH,
use crate::gossip_service::discover_cluster; contact_info::ContactInfo,
entry::{Entry, EntrySlice},
gossip_service::discover_cluster,
};
use solana_client::thin_client::create_client; use solana_client::thin_client::create_client;
use solana_runtime::epoch_schedule::MINIMUM_SLOTS_PER_EPOCH; use solana_runtime::epoch_schedule::MINIMUM_SLOTS_PER_EPOCH;
use solana_sdk::client::SyncClient; use solana_sdk::{
use solana_sdk::hash::Hash; client::SyncClient,
use solana_sdk::poh_config::PohConfig; hash::Hash,
use solana_sdk::pubkey::Pubkey; poh_config::PohConfig,
use solana_sdk::signature::{Keypair, KeypairUtil, Signature}; pubkey::Pubkey,
use solana_sdk::system_transaction; signature::{Keypair, KeypairUtil, Signature},
use solana_sdk::timing::{ system_transaction,
duration_as_ms, DEFAULT_NUM_TICKS_PER_SECOND, DEFAULT_TICKS_PER_SLOT, timing::{
NUM_CONSECUTIVE_LEADER_SLOTS, 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, path::Path, thread::sleep, time::Duration};
use std::collections::HashSet;
use std::path::Path;
use std::thread::sleep;
use std::time::Duration;
const DEFAULT_SLOT_MILLIS: u64 = (DEFAULT_TICKS_PER_SLOT * 1000) / DEFAULT_NUM_TICKS_PER_SECOND; const DEFAULT_SLOT_MILLIS: u64 = (DEFAULT_TICKS_PER_SLOT * 1000) / DEFAULT_NUM_TICKS_PER_SECOND;

View File

@ -1,3 +1,4 @@
pub mod cluster_tests;
pub mod local_cluster; pub mod local_cluster;
#[macro_use] #[macro_use]

View File

@ -2,20 +2,17 @@ extern crate solana;
use log::*; use log::*;
use serial_test_derive::serial; use serial_test_derive::serial;
use solana::blocktree::Blocktree; use solana::{
use solana::broadcast_stage::BroadcastStageType; blocktree::Blocktree, broadcast_stage::BroadcastStageType, cluster::Cluster,
use solana::cluster::Cluster; gossip_service::discover_cluster, validator::ValidatorConfig,
use solana::cluster_tests; };
use solana::gossip_service::discover_cluster; use solana_local_cluster::{
use solana::validator::ValidatorConfig; cluster_tests,
use solana_local_cluster::local_cluster::{ClusterConfig, LocalCluster}; local_cluster::{ClusterConfig, LocalCluster},
};
use solana_runtime::epoch_schedule::{EpochSchedule, MINIMUM_SLOTS_PER_EPOCH}; use solana_runtime::epoch_schedule::{EpochSchedule, MINIMUM_SLOTS_PER_EPOCH};
use solana_sdk::client::SyncClient; use solana_sdk::{client::SyncClient, poh_config::PohConfig, timing};
use solana_sdk::poh_config::PohConfig; use std::{collections::HashSet, thread::sleep, time::Duration};
use solana_sdk::timing;
use std::collections::HashSet;
use std::thread::sleep;
use std::time::Duration;
#[test] #[test]
#[serial] #[serial]