Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test troubleshooting section to README? #1723

Open
riverKanies opened this issue Nov 15, 2024 · 7 comments
Open

Add test troubleshooting section to README? #1723

riverKanies opened this issue Nov 15, 2024 · 7 comments
Labels
documentation Improvements or additions to documentation

Comments

@riverKanies
Copy link
Contributor

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:
#749 (comment)

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?

@ValuedMammal
Copy link
Contributor

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

@notmandatory notmandatory added the documentation Improvements or additions to documentation label Nov 18, 2024
@notmandatory notmandatory added this to BDK Nov 18, 2024
@notmandatory notmandatory moved this to Discussion in BDK Nov 18, 2024
@notmandatory
Copy link
Member

I agree we should mention it to help people with local testing. I usually use the command cargo test -- --test-threads=1.

@riverKanies
Copy link
Contributor Author

riverKanies commented Nov 18, 2024

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

@riverKanies
Copy link
Contributor Author

riverKanies commented Nov 18, 2024

@notmandatory should I make two separate PRs? one for the README and one to enforce running in series?

Update: went ahead and did so:
#1729
#1728

@oleonardolima
Copy link
Contributor

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.

@notmandatory
Copy link
Member

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.

@ValuedMammal
Copy link
Contributor

Actually this issue sounds like a good opportunity to add a justfile.

cc @praveenperera @oleonardolima

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Discussion
Development

No branches or pull requests

4 participants