From 1ae07aab02bbf63edeed45ec9f85053c6b7e7a3e Mon Sep 17 00:00:00 2001 From: kirill lykov Date: Mon, 18 Apr 2022 09:43:43 +0200 Subject: [PATCH] bench_tps test simplification (#24384) --- bench-tps/tests/bench_tps.rs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/bench-tps/tests/bench_tps.rs b/bench-tps/tests/bench_tps.rs index 6ac95f8cf..009661022 100644 --- a/bench-tps/tests/bench_tps.rs +++ b/bench-tps/tests/bench_tps.rs @@ -1,6 +1,5 @@ #![allow(clippy::integer_arithmetic)] use { - crossbeam_channel::unbounded, serial_test::serial, solana_bench_tps::{ bench::{do_bench_tps, generate_and_fund_keypairs}, @@ -12,7 +11,7 @@ use { tpu_client::{TpuClient, TpuClientConfig}, }, solana_core::validator::ValidatorConfig, - solana_faucet::faucet::{run_local_faucet, run_local_faucet_with_port}, + solana_faucet::faucet::run_local_faucet, solana_local_cluster::{ local_cluster::{ClusterConfig, LocalCluster}, validator_configs::make_identical_validator_configs, @@ -34,19 +33,9 @@ fn test_bench_tps_local_cluster(config: Config) { let faucet_keypair = Keypair::new(); let faucet_pubkey = faucet_keypair.pubkey(); - let (addr_sender, addr_receiver) = unbounded(); - run_local_faucet_with_port(faucet_keypair, addr_sender, None, 0); - let faucet_addr = addr_receiver - .recv_timeout(Duration::from_secs(2)) - .expect("run_local_faucet") - .expect("faucet_addr"); + let faucet_addr = run_local_faucet(faucet_keypair, None); const NUM_NODES: usize = 1; - let mut validator_config = ValidatorConfig::default_for_test(); - validator_config.rpc_config = JsonRpcConfig { - faucet_addr: Some(faucet_addr), - ..JsonRpcConfig::default_for_test() - }; let cluster = LocalCluster::new( &mut ClusterConfig { node_stakes: vec![999_990; NUM_NODES],