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

fix: explicitly set default ports in tests #1746

Conversation

paullatzelsperger
Copy link
Member

@paullatzelsperger paullatzelsperger commented Jul 27, 2022

What this PR changes/adds

this PR explicitly adds configuration values for default port and context path to tests that spin up an EDC runtime.

Why it does that

When running ./gradlew test with parallelism, parallel tests potentially attempt to spin up an EDC runtime, each of which binding against port 8181 (which is the default) which of course fails.
This supposedly only surfaced on local builds on machines with parallelism on, because it can never happen when running tests sequentially.

Further notes

What made this a bit tricky to debug is the fact, that by default the gradle runner does not print STDOUT. Supplying the -PverboseTest argument does cause it to be printed, but then slows down test execution significantly, which made the bug not occur again.

Linked Issue(s)

Closes #1743

Checklist

  • added appropriate tests?
  • performed checkstyle check locally?
  • added/updated copyright headers?
  • documented public classes/methods?
  • added/updated relevant documentation?
  • assigned appropriate label? (exclude from changelog with label no-changelog)
  • formatted title correctly? (take a look at the CONTRIBUTING and styleguide for details)

@paullatzelsperger paullatzelsperger added the bug Something isn't working label Jul 27, 2022
@paullatzelsperger paullatzelsperger force-pushed the bugfix/1743_api_tests_fail_locally branch from 335e527 to 7bccfd5 Compare July 28, 2022 08:02
@paullatzelsperger paullatzelsperger force-pushed the bugfix/1743_api_tests_fail_locally branch from 7bccfd5 to cecc7c3 Compare July 28, 2022 08:13
@paullatzelsperger paullatzelsperger merged commit 9254814 into eclipse-edc:main Jul 28, 2022
diegogomez-zf pushed a commit to diegogomez-zf/DataSpaceConnector that referenced this pull request Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local tests fail because 0.0.0.0:8181 is already bound
2 participants