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

RMI port range is not configurable for forked container [PAXEXAM-926] #1007

Open
ops4j-issues opened this issue May 17, 2019 · 1 comment
Open
Labels

Comments

@ops4j-issues
Copy link

Nikolas Falco created PAXEXAM-926

We use jenkins as CI system. We had migrate all our OSGi test cases to Pax Exam 5 (5 M1 to have support for suite/class rules/after and before class).
Some unit test needs to be run in a forked container (for example load to native libraries more times), but sometimes tests fails with a BindException (address 20000 already in use) during the execution of job jenkins (slaves have 4/5 executors).
Recently we change the pipeline to execute tests of the same maven project in parallel and 90% of JUnit fails with BindException. Looking into the code pax exam code the RMI port used to comunicate with the forked JVM is calculated using the first free port using in the range between 20000 and 21000. The issue is that at the time of check if the port is already binded, it is not, so it is released and configured as system property option. This means, except for rare exceptions, the system always get port 20000 as free one for all forked instance.
So I had try to configure the RMI port as JVM argument -Dpax.exam.invoker.port to the command line but without luck (it is "overridden" in DefaultExamSystem.combine).

  1. The logic must be changed to use a random port in the defined range and than try next available port untill reach the upperbound limit and continue from the initial limit.
  2. Make this range configurable
  3. Use the system property if already defined (by CLI).

Affects: 5.0.0
Votes: 0, Watches: 1

@ops4j-issues
Copy link
Author

Nikolas Falco commented

I turn this issue to Bug since it blocks builds on the same jenkins node machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant