Skip to content

Integration Tests Fail Locally: Bitcoind Wallet Init Errors & RPC Timeouts #1180

Closed as not planned

Description

@chavic

Okay... So on my local setup I’ve been consistently seeing integration tests fail when running ./contrib/test.sh. Unit tests complete successfully (161 passed), but as soon as the integration suite starts, every case that spins up our embedded bitcoind instance blows up with errors like:

  • Error: it appears that bitcoind is not reachable: Could not create or load wallet
  • JsonRpc(Transport(Minreq(IoError(Custom { kind: TimedOut, error: "the timeout of the request was reached" }))))
  • repeated suggestions from bitcoind to restart with -reindex or -reindex-chainstate

This suggests bitcoind either can’t start or dies before the RPC client connects, which then causes the v1/v2 and batching tests to panic (timeout/fatal).

At the moment, I’m assuming this is something peculiar to my environment—maybe someone else has the same issues when they do the following:

  • Run: dart test test/test_payjoin_integration_test.dart -p vm --plain-name 'Test integration Test integration v2 to v2' --reporter expanded
    Result: Fails after ~30 s with TimeoutException … Test timed out after 30 seconds while the OHTTP relay is listening (e.g. OHTTP relay binding to port [::]:52718). No additional stack trace beyond the harness suggesting --chain-stack-traces.

  • Run: ./contrib/test.sh (run from repo root)
    Result: Unit tests pass, but the integration binary trips over every scenario that needs bitcoind. Each failing case reports JsonRpc(Transport(Minreq(IoError(Custom { kind: TimedOut, error: "the timeout of the request was reached" })))), and the panics point to payjoin/tests/integration.rs (e.g. line 492 for v2_to_v2). Only integration::v2::test_bad_ohttp_keys succeeds; the remaining 12 integration tests fail with the same RPC timeout.

I'm on MacOS 15.7.1, Intel i9

Activity

  1. spacebear21 commented on Oct 29, 2025

    @spacebear21
    Collaborator

    @benalleng can you assist with this?

  2. benalleng commented on Oct 29, 2025

    @benalleng
    Collaborator

    Sure, I can.

  3. benalleng commented on Oct 29, 2025

    @benalleng
    Collaborator

    I have noticed that our integration tests slowed down and seem to be all run in parallel following our redis removal in #915 perhaps there is something there

  4. benalleng commented on Oct 29, 2025

    @benalleng
    Collaborator

    This command will let you test only the integration tests and with logging on the payjoin crate.

    RUST_LOG=debug cargo test -p payjoin --all-features integration -- --nocapture
    
  5. benalleng commented on Oct 29, 2025

    @benalleng
    Collaborator

    There appeared to be some bottlenecks based on the concurrent threads in chavic's setup, we were able to pass tests with.

    cargo test -p payjoin --all-features integration -- --test-threads=1
    

    I think there could be some bottlenecks on his machine that are hogging resources from allowing the tests to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions