File tree Expand file tree Collapse file tree 5 files changed +7
-6
lines changed
Expand file tree Collapse file tree 5 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 4141 ./gradlew ktlintCheck
4242
4343 - name : Generate Kotlin JVM
44- run : ./scripts/uniffi_bindgen_generate_kotlin.sh
44+ run : RUSTFLAGS="--cfg hrn_tests" ./scripts/uniffi_bindgen_generate_kotlin.sh
4545
4646 - name : Generate Kotlin Android
4747 run : ./scripts/uniffi_bindgen_generate_kotlin_android.sh
Original file line number Diff line number Diff line change 2121 uses : astral-sh/setup-uv@v7
2222
2323 - name : Generate Python bindings
24- run : ./scripts/uniffi_bindgen_generate_python.sh
24+ run : RUSTFLAGS="--cfg hrn_tests" ./scripts/uniffi_bindgen_generate_python.sh
2525
2626 - name : Start bitcoind and electrs
2727 run : docker compose up -d
Original file line number Diff line number Diff line change 8484 - name : Test on Rust ${{ matrix.toolchain }}
8585 if : " matrix.platform != 'windows-latest'"
8686 run : |
87- RUSTFLAGS="--cfg no_download --cfg cycle_tests" cargo test
87+ RUSTFLAGS="--cfg no_download --cfg cycle_tests --cfg hrn_tests " cargo test
8888 - name : Test with UniFFI support on Rust ${{ matrix.toolchain }}
8989 if : " matrix.platform != 'windows-latest' && matrix.build-uniffi"
9090 run : |
Original file line number Diff line number Diff line change 1818 run : rustup default stable
1919
2020 - name : Generate Swift bindings
21- run : ./scripts/uniffi_bindgen_generate_swift.sh
21+ run : RUSTFLAGS="--cfg hrn_tests" ./scripts/uniffi_bindgen_generate_swift.sh
Original file line number Diff line number Diff line change @@ -339,8 +339,9 @@ impl UnifiedPayment {
339339 /// as we cannot rely on the offer being present in the parsed URI.
340340 #[ cfg( hrn_tests) ]
341341 pub fn set_test_offer ( & self , _offer : Offer ) {
342- let mut guard = self . test_offer . lock ( ) . unwrap ( ) ;
343- * guard = Some ( _offer) ;
342+ let _ = self . test_offer . lock ( ) . map ( |mut guard| * guard = Some ( _offer) ) . map_err ( |e| {
343+ log_error ! ( self . logger, "Failed to set test offer due to poisoned lock: {:?}" , e)
344+ } ) ;
344345 }
345346}
346347
You can’t perform that action at this time.
0 commit comments