Skip to content

parallelize FFI language binding tests in contrib/test.sh#1504

Open
caarloshenriq wants to merge 3 commits intopayjoin:masterfrom
caarloshenriq:fix/parallelize-ffi-binding-tests
Open

parallelize FFI language binding tests in contrib/test.sh#1504
caarloshenriq wants to merge 3 commits intopayjoin:masterfrom
caarloshenriq:fix/parallelize-ffi-binding-tests

Conversation

@caarloshenriq
Copy link
Copy Markdown
Contributor

Parallelizes the language binding tests in payjoin-ffi/contrib/test.sh
instead of running them sequentially.

This is a follow-up to a comment by @spacebear21 on #1492.

AI Assistance: Used Claude to help implement the parallelization approach.

Pull Request Checklist

Please confirm the following before requesting review:

@caarloshenriq caarloshenriq marked this pull request as draft April 25, 2026 19:39
@caarloshenriq caarloshenriq marked this pull request as ready for review April 27, 2026 15:06
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Apr 27, 2026

Coverage Report for CI Build 25125404880

Coverage remained the same at 84.989%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 13437
Covered Lines: 11420
Line Coverage: 84.99%
Coverage Strength: 398.83 hits per line

💛 - Coveralls

@benalleng benalleng force-pushed the fix/parallelize-ffi-binding-tests branch from cbb780f to 8b64a29 Compare April 27, 2026 15:55
Copy link
Copy Markdown
Collaborator

@benalleng benalleng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a commit to fix the execution permissions which were a problem in JS too.

TACK 8b64a29

@benalleng
Copy link
Copy Markdown
Collaborator

So I have it in writing I did have to clean the ~/payjoin-ffi/dart/native/Cargo.lock as it was suffering from a failure due to the stuff from #1502. Maybe it would be useful to have a script to just clean this deep nested lockfile every time we run tests assuming it doesn't get touched very often.

@benalleng benalleng requested a review from spacebear21 April 27, 2026 16:12
@caarloshenriq
Copy link
Copy Markdown
Contributor Author

Maybe it would be useful to have a script to just clean this

added a script in dart/contrib/test.sh to clean this.

Copy link
Copy Markdown
Collaborator

@spacebear21 spacebear21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cACK

I'm afk this week so may not get around to testing this but ideally would like someone to validate and post the output of:

  • all succeeds
  • fails for one specific language
  • fails for all languages

@caarloshenriq
Copy link
Copy Markdown
Contributor Author

would like someone to validate and post the output

Here are the three scenarios you requested. I've trimmed the outputs for readability as they were quite verbose:

1. All succeeds (exit code: 0):

== Running dart tests...
00:21 +17: All tests passed!

== Running C# tests...
Payjoin.Tests - Payjoin.Tests.dll
Test run for Payjoin.Tests.dll (.NETCoreApp,Version=v8.0)

== Running tests... (python)
Ran 17 tests in 13.993s OK

== Running JavaScript tests...
npm run ubrn:web && npm run compile && npm run copy-wasm && npm run fix-imports
✓ All done

$ echo $? - 0

2. Fails for one specific language — javascript (exit code: 1):

00:20 +17: All tests passed! (dart)
Ran 17 tests in 11.809s OK (python)

error: failed to select a version for `bitcoin-units`
...failed to select a version for `bitcoin-units` which could resolve this conflict
Error: Failed to run command (javascript)

$ echo $? - 1

3. Fails for all languages (exit code: 1):

running 0 tests
test result: ok. 0 passed (rust)

dart: exit 1
javascript: exit 1
python: exit 1
csharp: exit 1

$ echo $? - 1

In all failure scenarios the script correctly returns exit code 1, and in scenario 2 the passing languages continued running in parallel without being blocked by the failing one.

@caarloshenriq caarloshenriq force-pushed the fix/parallelize-ffi-binding-tests branch from 762a5b7 to 54b39c1 Compare April 29, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants