From 885887acebd7449f11646193a141606dd3904c8f Mon Sep 17 00:00:00 2001 From: Riccardo Casatta Date: Mon, 4 Nov 2024 16:27:46 +0100 Subject: [PATCH] ignore test and execute singularly At the moment we cannot concurrently tests because the server will conflict with each other, this make the test_electrum_raw test ignored by default, and add a test in CI specifically for this test. --- .github/workflows/rust.yml | 4 ++++ tests/electrum.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4f51c0f1..b6b7ff5d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -45,9 +45,13 @@ jobs: - name: Tests (Bitcoin mode, REST+Electrum) run: RUST_LOG=debug cargo test + - name: Test test_electrum_raw + run: RUST_LOG=debug cargo test -- --include-ignored test_electrum_raw + - name: Tests (Liquid mode, REST) run: RUST_LOG=debug cargo test --features liquid + nix: runs-on: ubuntu-latest steps: diff --git a/tests/electrum.rs b/tests/electrum.rs index 3dacf74b..bbb62325 100644 --- a/tests/electrum.rs +++ b/tests/electrum.rs @@ -145,6 +145,7 @@ fn test_electrum() -> Result<()> { /// This only runs on Bitcoin (non-Liquid) mode. #[cfg_attr(not(feature = "liquid"), test)] #[cfg_attr(feature = "liquid", allow(dead_code))] +#[ignore = "must be launched singularly, otherwise conflict with the other server"] fn test_electrum_raw() { // Spawn an Electrs Electrum RPC server let (_electrum_server, electrum_addr, mut _tester) = common::init_electrum_tester().unwrap();