Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
IAvecilla committed Mar 22, 2024
1 parent 5c5629e commit ffa2fe0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions node/tests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use zksync_consensus_tools::k8s::{chaos_mesh::ops::delete_chaos_delay_for_pod, P

use crate::utils::{
add_chaos_delay_for_target_pods, check_health_of_node, get_consensus_node_rpc_client,
get_last_commited_block,
get_last_committed_block,
};

mod utils;
Expand Down Expand Up @@ -114,14 +114,14 @@ pub async fn delay_test(test_result: Arc<Mutex<u8>>) -> anyhow::Result<()> {
add_chaos_delay_for_target_pods(target_nodes.clone())
.await
.unwrap();
let last_commited_block = get_last_commited_block(rpc_client.clone()).await.unwrap();
let last_committed_block = get_last_committed_block(rpc_client.clone()).await.unwrap();
delete_chaos_delay_for_pod(target_nodes.first().unwrap())
.await
.unwrap();
// Wait for the deletion of the chaos delay.
sleep(Duration::from_secs(2));
let new_last_commited_block = get_last_commited_block(rpc_client).await.unwrap();
assert!(new_last_commited_block > last_commited_block);
let new_last_committed_block = get_last_committed_block(rpc_client).await.unwrap();
assert!(new_last_committed_block > last_committed_block);
*test_result.lock().unwrap() += 1;
Ok(())
}
Expand Down
12 changes: 6 additions & 6 deletions node/tests/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use jsonrpsee::{
use zksync_consensus_tools::k8s::chaos_mesh;
use zksync_consensus_tools::{
k8s::{self, PodId},
rpc::methods::{health_check, last_commited_block},
rpc::methods::{health_check, last_committed_block},
};

/// Get the RPC clients for all the consensus nodes.
Expand All @@ -34,15 +34,15 @@ pub(crate) async fn add_chaos_delay_for_target_pods(target_pods: Vec<PodId>) ->
}

/// Get the last commited block using the rpc_client of the consensus node.

Check warning on line 36 in node/tests/src/utils.rs

View workflow job for this annotation

GitHub Actions / typos

"commited" should be "committed".
pub(crate) async fn get_last_commited_block(rpc_client: HttpClient) -> anyhow::Result<u64> {
pub(crate) async fn get_last_committed_block(rpc_client: HttpClient) -> anyhow::Result<u64> {
let response: serde_json::Value = rpc_client
.request(last_commited_block::method(), rpc_params!())
.request(last_committed_block::method(), rpc_params!())
.await
.context("Failed to get last commited block")?;

Check warning on line 41 in node/tests/src/utils.rs

View workflow job for this annotation

GitHub Actions / typos

"commited" should be "committed".
let last_commited_block: u64 =
serde_json::from_value(response.get("last_commited_block").unwrap().to_owned())
let last_committed_block: u64 =
serde_json::from_value(response.get("last_committed_block").unwrap().to_owned())
.context("Failed to parse last commited block")?;

Check warning on line 44 in node/tests/src/utils.rs

View workflow job for this annotation

GitHub Actions / typos

"commited" should be "committed".
Ok(last_commited_block)
Ok(last_committed_block)
}

/// Check the health of the consensus node using its rpc_client.
Expand Down
4 changes: 2 additions & 2 deletions node/tools/src/k8s/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ pub async fn create_or_reuse_namespace(client: &Client, name: &str) -> anyhow::R
}

pub async fn expose_tester_rpc(client: &Client) -> anyhow::Result<()> {
let load_balancer_sevice = Service {
let load_balancer_service = Service {
metadata: ObjectMeta {
name: Some("tester-rpc".to_string()),
namespace: Some(DEFAULT_NAMESPACE.to_string()),
Expand All @@ -410,7 +410,7 @@ pub async fn expose_tester_rpc(client: &Client) -> anyhow::Result<()> {

let services: Api<Service> = Api::namespaced(client.clone(), DEFAULT_NAMESPACE);
let post_params = PostParams::default();
let result = services.create(&post_params, &load_balancer_sevice).await?;
let result = services.create(&post_params, &load_balancer_service).await?;

info!(
"Service: {} , created",
Expand Down

0 comments on commit ffa2fe0

Please sign in to comment.