diff --git a/Cargo.lock b/Cargo.lock index 17601d068fb..f66b0e8b643 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -300,7 +300,7 @@ dependencies = [ "async-stream", "async-trait", "auto_impl", - "dashmap", + "dashmap 6.1.0", "futures", "futures-utils-wasm", "lru", @@ -3027,6 +3027,19 @@ dependencies = [ "syn 2.0.79", ] +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "dashmap" version = "6.1.0" @@ -6372,7 +6385,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5d97014786c173a839839e2a068e82516ad1eb94fca1d40013d3c5e224e7c1e" dependencies = [ - "dashmap", + "dashmap 6.1.0", "melior-macro", "mlir-sys", "once_cell", @@ -7118,7 +7131,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.79", @@ -9799,6 +9812,31 @@ dependencies = [ "syn 2.0.79", ] +[[package]] +name = "serial_test" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" +dependencies = [ + "dashmap 5.5.3", + "futures", + "lazy_static", + "log", + "parking_lot", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + [[package]] name = "sha-1" version = "0.9.8" @@ -10472,6 +10510,7 @@ dependencies = [ "pretty_assertions", "rstest", "serde_json", + "serial_test", "starknet-types-core", "starknet_api", "starknet_batcher", diff --git a/crates/starknet_integration_tests/Cargo.toml b/crates/starknet_integration_tests/Cargo.toml index 1384ad7530c..c974dc70c3e 100644 --- a/crates/starknet_integration_tests/Cargo.toml +++ b/crates/starknet_integration_tests/Cargo.toml @@ -48,4 +48,5 @@ futures.workspace = true itertools.workspace = true pretty_assertions.workspace = true rstest.workspace = true +serial_test.workspace = true starknet_sequencer_infra.workspace = true diff --git a/crates/starknet_integration_tests/tests/end_to_end_flow_test.rs b/crates/starknet_integration_tests/tests/end_to_end_flow_test.rs index 20e3f4b3eb3..ecef7b7d0d6 100644 --- a/crates/starknet_integration_tests/tests/end_to_end_flow_test.rs +++ b/crates/starknet_integration_tests/tests/end_to_end_flow_test.rs @@ -14,6 +14,7 @@ use papyrus_protobuf::consensus::{ use papyrus_storage::test_utils::CHAIN_ID_FOR_TESTS; use pretty_assertions::assert_eq; use rstest::{fixture, rstest}; +use serial_test::serial; use starknet_api::block::{BlockHash, BlockNumber}; use starknet_api::transaction::TransactionHash; use starknet_integration_tests::definitions::MockSystemMode; @@ -35,15 +36,21 @@ fn tx_generator() -> MultiAccountTransactionGenerator { } #[rstest] +#[case::local_connection(MockSystemMode::Local)] +#[case::remote_connection(MockSystemMode::Remote)] #[tokio::test] -async fn end_to_end_flow(mut tx_generator: MultiAccountTransactionGenerator) { +#[serial] +async fn end_to_end_flow( + mut tx_generator: MultiAccountTransactionGenerator, + #[case] mock_system_mode: MockSystemMode, + ) { configure_tracing().await; const LISTEN_TO_BROADCAST_MESSAGES_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(50); // Setup. let mut mock_running_system = - FlowTestSetup::new_from_tx_generator(&tx_generator, MockSystemMode::Local).await; + FlowTestSetup::new_from_tx_generator(&tx_generator, mock_system_mode).await; let next_height = INITIAL_HEIGHT.unchecked_next(); let heights_to_build = next_height.iter_up_to(LAST_HEIGHT.unchecked_next());