From 3a72c992e4c8819be3fe87f0099143fc7c83f85d Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Sun, 22 Dec 2024 11:48:18 +0700 Subject: [PATCH] bet --- .../starknet/test/tests/high_load_stress.rs | 4 ++-- .../starknet/test/tests/node_recovery.rs | 4 ++-- .../test/tests/validator_set_changes.rs | 24 +++++++++++++++---- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/code/crates/starknet/test/tests/high_load_stress.rs b/code/crates/starknet/test/tests/high_load_stress.rs index 5f1ce8e8..e3b1e9d3 100644 --- a/code/crates/starknet/test/tests/high_load_stress.rs +++ b/code/crates/starknet/test/tests/high_load_stress.rs @@ -1,5 +1,5 @@ -use std::time::Duration; use informalsystems_malachitebft_starknet_test::{init_logging, TestBuilder}; +use std::time::Duration; #[tokio::test] async fn high_load_stress_test() { @@ -22,4 +22,4 @@ async fn high_load_stress_test() { node.wait_until(HEIGHT).success(); test.build().run(Duration::from_secs(60)).await; -} \ No newline at end of file +} diff --git a/code/crates/starknet/test/tests/node_recovery.rs b/code/crates/starknet/test/tests/node_recovery.rs index a7974c39..1008b3eb 100644 --- a/code/crates/starknet/test/tests/node_recovery.rs +++ b/code/crates/starknet/test/tests/node_recovery.rs @@ -1,5 +1,5 @@ -use std::time::Duration; use informalsystems_malachitebft_starknet_test::{init_logging, TestBuilder}; +use std::time::Duration; #[tokio::test] async fn node_recovery_after_crash() { @@ -27,4 +27,4 @@ async fn node_recovery_after_crash() { .success(); test.build().run(Duration::from_secs(60)).await; -} \ No newline at end of file +} diff --git a/code/crates/starknet/test/tests/validator_set_changes.rs b/code/crates/starknet/test/tests/validator_set_changes.rs index abefe6e8..414b0172 100644 --- a/code/crates/starknet/test/tests/validator_set_changes.rs +++ b/code/crates/starknet/test/tests/validator_set_changes.rs @@ -1,5 +1,5 @@ -use std::time::Duration; use informalsystems_malachitebft_starknet_test::{init_logging, TestBuilder}; +use std::time::Duration; #[tokio::test] async fn dynamic_validator_set_changes() { @@ -10,9 +10,23 @@ async fn dynamic_validator_set_changes() { let mut test = TestBuilder::<()>::new(); // Configure all nodes at once - test.add_node().with_voting_power(10).start().wait_until(5).wait_until(HEIGHT).success(); - test.add_node().with_voting_power(10).start().wait_until(5).wait_until(HEIGHT).success(); - test.add_node().with_voting_power(10).start().wait_until(HEIGHT).success(); + test.add_node() + .with_voting_power(10) + .start() + .wait_until(5) + .wait_until(HEIGHT) + .success(); + test.add_node() + .with_voting_power(10) + .start() + .wait_until(5) + .wait_until(HEIGHT) + .success(); + test.add_node() + .with_voting_power(10) + .start() + .wait_until(HEIGHT) + .success(); test.build().run(Duration::from_secs(60)).await; -} \ No newline at end of file +}