Open riverKanies opened 1 week ago
Yeah I think it could help but I also think something like cargo nextest would be a nice solution. Basically you can configure groups of tests to run sequentially, i.e. not in parallel
I agree we should mention it to help people with local testing. I usually use the command cargo test -- --test-threads=1
.
hmm, ok, I figured it was an issue specific to my environment, but thinking about it it does seem like it should be necessary to run tests that ping a blockchain client in series, so it probably does make sense to enforce that. I tried it out and it seems to work! will push a PR momentarily. thanks for the tip @ValuedMammal
@notmandatory should I make two separate PRs? one for the README and one to enforce running in series?
Update: went ahead and did so: https://github.com/bitcoindevkit/bdk/pull/1729 https://github.com/bitcoindevkit/bdk/pull/1728
IIRC it's usually an issue on macOS, I don't remember facing it on Linux, maybe should point that out on the troubleshooting. Yes, it's a good idea to add the troubleshooting. FWIW I usually use --test-threads=2
without any problem.
Yes I've also only see this issue on MacOS, so best to document it in #1729. On Linux parallel testing is fine and since the CI is on Linux I'd rather not force these tests to always be done in serial, the CI already runs too slow.
tests involving bitcoind failing on mac:
Error: JSON-RPC error: transport error: Couldn't connect to host: Resource temporarily unavailable (os error 35)
Found answer here after some digging: https://github.com/bitcoindevkit/bdk/issues/749#issuecomment-1247580407
RUST_TEST_THREADS=1 cargo test
To me it seems worth including this in a test section in the README.md what do y'all think?