Skip to content

Commit

Permalink
chore(ln-dlc-node): Speed up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
luckysori committed Oct 25, 2023
1 parent 635b365 commit dd7a857
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async fn ln_collab_close() {
.unwrap();

while !payee.list_channels().is_empty() {
tokio::time::sleep(Duration::from_millis(500)).await;
tokio::time::sleep(Duration::from_millis(100)).await;
}

// Give some time for the close transaction to be broadcast before trying to include it in a
Expand Down
4 changes: 2 additions & 2 deletions crates/ln-dlc-node/src/tests/load.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ async fn open_position(coordinator: &Coordinator, app: &Node<InMemoryStore>) ->
}
}

tokio::time::sleep(Duration::from_millis(500)).await;
tokio::time::sleep(Duration::from_millis(100)).await;
}
})
.await
Expand Down Expand Up @@ -134,7 +134,7 @@ async fn close_position(coordinator: &Coordinator, app: &Node<InMemoryStore>) ->
}
}

tokio::time::sleep(Duration::from_millis(500)).await;
tokio::time::sleep(Duration::from_millis(100)).await;
}
})
.await
Expand Down
2 changes: 1 addition & 1 deletion crates/ln-dlc-node/src/tests/load/coordinator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl Coordinator {
}

tracing::debug!("Waiting for channel to be usable");
tokio::time::sleep(Duration::from_millis(500)).await;
tokio::time::sleep(Duration::from_millis(100)).await;
}

anyhow::Ok(())
Expand Down
4 changes: 2 additions & 2 deletions crates/ln-dlc-node/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ impl Node<InMemoryStore> {
temp_channel_id = %hex::encode(temp_channel_id),
"Waiting for channel to be usable"
);
tokio::time::sleep(Duration::from_millis(500)).await;
tokio::time::sleep(Duration::from_millis(100)).await;
}
})
.await?;
Expand Down Expand Up @@ -478,7 +478,7 @@ where
loop {
match predicate_fn().await? {
Some(value) => return Ok(value),
None => tokio::time::sleep(Duration::from_millis(500)).await,
None => tokio::time::sleep(Duration::from_millis(100)).await,
};
}
})
Expand Down

0 comments on commit dd7a857

Please sign in to comment.