Skip to content

Commit f115da2

Browse files
committed
Merge #176: Roll a custom TestEnv and drop lazy_static
5748132 refactor(test): properly assert for HTTP headers (Leonardo Lima) ed9d7ad feat(test): roll a custom `TestEnv` and drop `lazy_static` (Luis Schwab) b6bb968 chore(ci): fix pinning for 1.75.0 MSRV (Luis Schwab) Pull request description: Closes #149 Implement a custom `TestEnv`, which is instantiated per-test and fixes the un-dropped `bitcoind` issue. This also allows running tests with more than 1 thread, since they no longer share `bitcoind` and `electrsd` instances. Also adds helpers to fetch externally sourced addresses, fixing the issue where `bitcoind`'s wallet would send change outputs to it's own wallet address, which would mess with `test_get_scripthash_stats`. The `test` recipe and CI job are updated to now use 16 threads. ACKs for top commit: oleonardolima: ACK 5748132 Tree-SHA512: 5143abc8ef5835755aff6e234caac2214d1af6f20743af3f8eb2fbc0ab3a7a34b6b675a9a7850ab804bdd2f8b1e0673319cfe17063a60334fcca45e5de67c203
2 parents 7138749 + 5748132 commit f115da2

File tree

5 files changed

+433
-359
lines changed

5 files changed

+433
-359
lines changed

.github/workflows/cont_integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Build
5454
run: cargo build --features ${{ matrix.features }} --no-default-features
5555
- name: Test
56-
run: cargo test --features ${{ matrix.features }} --no-default-features -- --test-threads=1
56+
run: cargo test --features ${{ matrix.features }} --no-default-features -- --test-threads=16
5757

5858
fmt:
5959
name: Rust Formatting

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ tokio = { version = "1", features = ["time"], optional = true }
3434
[dev-dependencies]
3535
tokio = { version = "1.20.1", features = ["full"] }
3636
electrsd = { version = "0.36.1", features = ["legacy", "esplora_a33e97e1", "corepc-node_29_0"] }
37-
lazy_static = "1.4.0"
3837

3938
[features]
4039
default = ["blocking", "async", "async-https", "tokio"]

ci/pin-msrv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -euo pipefail
55

66
# Pin dependencies for MSRV (1.75.0)
77
cargo update -p minreq --precise "2.13.2"
8-
cargo update -p idna_adapter --precise "1.2.0"
98
cargo update -p native-tls --precise "0.2.13"
9+
cargo update -p idna_adapter --precise "1.2.0"
1010
cargo update -p zerofrom --precise "0.1.5"
1111
cargo update -p litemap --precise "0.7.4"

justfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ fmt:
2828

2929
# Build and test using the MSRV toolchain (1.75.0)
3030
msrv:
31-
bash ci/pin-msrv.sh
32-
cargo +1.75.0 build --all-features
33-
cargo +1.75.0 test --all-features -- --test-threads=1
31+
rm -rf Cargo.lock
32+
bash ci/pin-msrv.sh
33+
cargo +1.75.0 build --all-features
34+
cargo +1.75.0 test --all-features -- --test-threads=16
3435

3536
# Run pre-push suite: format, check, and test
36-
pre-push: fmt check test
37+
pre-push: fmt check test msrv
3738

3839
# Run all tests on the workspace with all features
3940
test:
40-
cargo test --all-features -- --test-threads=1
41+
cargo test --all-features -- --test-threads=16

0 commit comments

Comments
 (0)