Skip to content

Commit

Permalink
test: test
Browse files Browse the repository at this point in the history
commit-id:300ffcf0
  • Loading branch information
nadin-Starkware committed Dec 26, 2024
1 parent 4a95470 commit f97001a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
14 changes: 8 additions & 6 deletions crates/starknet_integration_tests/src/end_to_end_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,15 @@ pub async fn end_to_end_integration(mut tx_generator: MultiAccountTransactionGen
get_node_executable_path();

// TODO(Nadin): Assign a dedicated set of available ports to each sequencer.
let mut available_ports =
let available_ports =
AvailablePorts::new(TestIdentifier::EndToEndIntegrationTest.into(), 0);

let component_configs: Vec<ComponentConfig> = vec![ComponentConfig::default(); N_SEQUENCERS]
.into_iter()
.chain(get_remote_test_component_config(&mut available_ports))
.collect();
info!("Available ports: {:?}", available_ports);
info!("******************************************");
let component_configs: Vec<ComponentConfig> = vec![ComponentConfig::default(); N_SEQUENCERS];
// component_configs.extend(get_remote_test_component_config(&mut available_ports));

info!("Component configs: {:?}", component_configs);

info!("Running integration test setup.");
// Creating the storage for the test.
Expand Down Expand Up @@ -135,7 +137,7 @@ fn get_non_http_component_config(gateway_socket: SocketAddr) -> ComponentConfig
}
}

fn get_remote_test_component_config(available_ports: &mut AvailablePorts) -> Vec<ComponentConfig> {
pub fn get_remote_test_component_config(available_ports: &mut AvailablePorts) -> Vec<ComponentConfig> {
let gateway_socket = available_ports.get_next_local_host_socket();
vec![
get_http_only_component_config(gateway_socket),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use std::net::SocketAddr;
use std::path::PathBuf;
use std::thread::sleep;
use std::time::Duration;

use blockifier::context::ChainInfo;
use mempool_test_utils::starknet_api_test_utils::{Contract, MultiAccountTransactionGenerator};
Expand Down Expand Up @@ -49,6 +51,11 @@ impl IntegrationTestSetup {
let chain_info = create_chain_info();
let accounts = tx_generator.accounts();
let n_sequencers = component_configs.len();
info!("Creating sequencers.");
info!("n_sequencers: {}", n_sequencers);
info!("component_configs len is: {}", component_configs.len());
info!("Component configs: {:?}", component_configs);
sleep(Duration::from_secs(5));

let (mut consensus_manager_configs, consensus_proposals_channels) =
create_consensus_manager_configs_and_channels(n_sequencers, &mut available_ports);
Expand Down

0 comments on commit f97001a

Please sign in to comment.