Skip to content

Commit

Permalink
fix ternary test
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 committed Jul 10, 2024
1 parent 2d7fdaa commit a777772
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions tools/integration-test/src/tests/tendermint/sequential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl BinaryChannelTest for SequentialCommitTest {
ChainType::Namada => (
Duration::from_millis((BLOCK_TIME_MILLIS * TOTAL_TRANSACTIONS as u64) - 1000),
Duration::from_millis(
(BLOCK_TIME_MILLIS * TOTAL_TRANSACTIONS as u64) * 2 + 1000,
(BLOCK_TIME_MILLIS * TOTAL_TRANSACTIONS as u64 * 2) + 1000,
),
),
_ => {
Expand Down Expand Up @@ -164,7 +164,10 @@ impl BinaryChannelTest for SequentialCommitTest {
);

let max_duration = match chains.node_b.chain_driver().value().chain_type {
ChainType::Namada => Duration::from_millis(BLOCK_TIME_MILLIS * 2 * 2),
ChainType::Namada => {
// Shorter than the sequential batches
Duration::from_millis(BLOCK_TIME_MILLIS * TOTAL_TRANSACTIONS as u64 * 2)
}
_ => Duration::from_millis(BLOCK_TIME_MILLIS * 2),
};
assert!(duration < max_duration);
Expand Down
4 changes: 3 additions & 1 deletion tools/test-framework/src/framework/nary/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ where
let mut node_processes = Vec::new();

for i in 0..SIZE {
let node = if builder.command_paths.contains(&"namada".to_string()) {
let is_namada = builder.command_paths == vec!["namada".to_string()]
|| builder.command_paths.get(i) == Some(&"namada".to_string());
let node = if is_namada {
bootstrap_namada_node(
builder,
&format!("{}", i + 1),
Expand Down

0 comments on commit a777772

Please sign in to comment.