Skip to content

Commit

Permalink
test: remove log syncrhonization from nns recovery system test (#3602)
Browse files Browse the repository at this point in the history
  • Loading branch information
DSharifi authored Jan 27, 2025
1 parent b9ee50e commit 1ef59e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
1 change: 0 additions & 1 deletion rs/http_endpoints/public/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ fn start_server_initialization(
])
.inc();
health_status.store(ReplicaHealthStatus::Healthy);
// TODO: NNS1-2024
info!(log, "Ready for interaction.");
});
}
Expand Down
28 changes: 6 additions & 22 deletions rs/tests/nns/ic_mainnet_nns_recovery/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ fn support_snses(
recovered_nns_public_key.clone(),
);

wait_until_ready_for_interaction(env.logger(), new_subnet_node.clone());
new_subnet_node
.await_status_is_healthy()
.expect("New subnet node should become healthy.");

let new_subnet_id = get_app_subnet_id(
env.clone(),
Expand Down Expand Up @@ -851,27 +853,9 @@ fn recover_nns_subnet(
if !exit_status.success() {
panic!("{cmd:?} failed!");
}
wait_until_ready_for_interaction(logger.clone(), recovered_nns_node);
}

fn wait_until_ready_for_interaction(logger: Logger, node: IcNodeSnapshot) {
let node_ip = node.get_ip_addr();
info!(
logger.clone(),
"Waiting until node {node_ip:?} is ready for interaction ..."
);
ic_system_test_driver::retry_with_msg!(
format!("Check if node {node_ip:?} is ready for interaction"),
logger.clone(),
Duration::from_secs(500),
Duration::from_secs(5),
|| node.block_on_bash_script("journalctl | grep -q 'Ready for interaction'")
)
.unwrap_or_else(|e| {
panic!("Node {node_ip:?} didn't become ready for interaction in time because {e:?}")
});

info!(logger, "Node {node_ip:?} is ready for interaction.");
recovered_nns_node
.await_status_is_healthy()
.expect("Recovered NNS node should become healthy.");
}

fn test_recovered_nns(env: TestEnv, neuron_id: NeuronId, nns_node: IcNodeSnapshot) {
Expand Down

0 comments on commit 1ef59e5

Please sign in to comment.