Skip to content

Commit

Permalink
chore(starknet_integration_tests): remove holding the node handle in …
Browse files Browse the repository at this point in the history
…flow tests

commit-id:2c8eb8b1
  • Loading branch information
lev-starkware committed Dec 18, 2024
1 parent 3972230 commit 3f90e9a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion crates/starknet_integration_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ license.workspace = true
workspace = true

[dependencies]
anyhow.workspace = true
assert_matches.workspace = true
blockifier.workspace = true
cairo-lang-starknet-classes.workspace = true
Expand Down
11 changes: 3 additions & 8 deletions crates/starknet_integration_tests/src/flow_test_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use starknet_sequencer_node::config::node_config::SequencerNodeConfig;
use starknet_sequencer_node::servers::run_component_servers;
use starknet_sequencer_node::utils::create_node_modules;
use tempfile::TempDir;
use tokio::task::JoinHandle;
use tracing::{debug, instrument};

use crate::state_reader::{spawn_test_rpc_state_reader, StorageTestSetup};
Expand Down Expand Up @@ -94,9 +93,7 @@ pub struct SequencerSetup {
pub rpc_storage_file_handle: TempDir,
pub state_sync_storage_file_handle: TempDir,

// Handle of the sequencer node.
pub sequencer_node_handle: JoinHandle<Result<(), anyhow::Error>>,

// Node configuration.
pub config: SequencerNodeConfig,

// Monitoring client.
Expand Down Expand Up @@ -142,17 +139,15 @@ impl SequencerSetup {
let HttpServerConfig { ip, port } = config.http_server_config;
let add_tx_http_client = HttpTestClient::new(SocketAddr::from((ip, port)));

// Build and run the sequencer node.
let sequencer_node_future = run_component_servers(servers);
let sequencer_node_handle = tokio::spawn(sequencer_node_future);
// Run the sequencer node.
tokio::spawn(run_component_servers(servers));

Self {
sequencer_index,
add_tx_http_client,
batcher_storage_file_handle: storage_for_test.batcher_storage_handle,
rpc_storage_file_handle: storage_for_test.rpc_storage_handle,
state_sync_storage_file_handle: storage_for_test.state_sync_storage_handle,
sequencer_node_handle,
config,
is_alive_test_client,
}
Expand Down

0 comments on commit 3f90e9a

Please sign in to comment.