Skip to content

Commit

Permalink
chore(tests-e2e): Continue if coordinator sync returns an error
Browse files Browse the repository at this point in the history
Unfortunately, sharing the same coordinator between tests means that
calling the `sync` endpoint can return an error for unrelated and not
critical reasons.

This is not a pretty fix. A better fix might involve running each e2e
test as a separate job (step?), like `rust-dlc` does.
  • Loading branch information
luckysori committed Feb 2, 2024
1 parent fe4acea commit 238e6ac
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions crates/tests-e2e/src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ impl TestSetup {
.unwrap();

self.bitcoind.mine(1).await.unwrap();
self.coordinator.sync_node().await.unwrap();

self.sync_coordinator().await;

// TODO: Get coordinator balance to verify this claim.
tracing::info!("Successfully funded coordinator");
Expand Down Expand Up @@ -134,10 +135,16 @@ impl TestSetup {
sync_dlc_channels();
refresh_wallet_info();

setup.coordinator.sync_node().await.unwrap();
setup.sync_coordinator().await;

setup
}

async fn sync_coordinator(&self) {
if let Err(e) = self.coordinator.sync_node().await {
tracing::error!("Got error from coordinator sync: {e:#}");
};
}
}

pub fn dummy_order() -> NewOrder {
Expand Down

0 comments on commit 238e6ac

Please sign in to comment.