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_info;
pub mod cluster_info_repair_listener;
pub mod cluster_tests;
pub mod consensus;
pub mod cuda_runtime;
pub mod entry;

View File

@ -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;

View File

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

View File

@ -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]