-
Notifications
You must be signed in to change notification settings - Fork 143
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
[Build] Run Maven build in parallel and only up until the verify phase #1010
Conversation
Looks like the test become flaky if run in parallel. Does anybody has experience with that? |
I assume parallel tests do not run in different VNC clients? I don't know how you run UI tests in parallel, probably on different displays on Linux but no idea about Windows. Usually UI tests are very sensible, as all of UI inputs/outputs are "singletons" (clipboard, keyboard, mouse, application focus), so UI tests running in parallel on same machine most likely will be affected by that. |
You would need to ensure that all bundles executing UI tests (namely Maybe you know that @laeubi also did some according experiments for Platform UI (see eclipse-platform/eclipse.platform.ui#921). |
It all depends on the test, e.g. if you have tests that use a shared resource (like clipboard) one might want to write them in a way that it synchronize on that resource. e.g Junit5 has @ResourceLock. For different bundles surefire has a special settings reactorConcurrencyLevel that limits the number of parallel executing reactor projects that use tests. |
Thank you for all the input.
Unfortunately One hack might be to have an explicit dependency of |
a39892f
to
89bf285
Compare
Looks like this worked (at least in the last pass). |
You mean in parallel ;-) |
Yes. Meant at the same time, in parallel. Not together^^ |
Because the swt.tests and some platform specific tests (a.t.m. only windows) use the same not-shareable resources during their execution they must not run in parallel. In order to ensure that (as hacky solution), add a dependency from each platform-specific test to org.eclipse.swt.tests.
89bf285
to
48447f9
Compare
Added it now for all. |
@@ -6,7 +6,8 @@ Bundle-Version: 3.108.100.qualifier | |||
Bundle-Vendor: Eclipse.org | |||
Bundle-Localization: plugin | |||
Require-Bundle: org.junit;bundle-version="4.12.0", | |||
org.eclipse.swt | |||
org.eclipse.swt, | |||
org.eclipse.swt.tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with such a dependency is that it only makes sense in the context of a parallel Maven build. It does something else than what these dependency specifications are supposed to be used for, so no one except the ones involved in this PR will know that (and probably even they will forget), so there will be people trying to understand the necessity for this dependency and eventually even remove it.
I would at least suggest to add a comment in the Manifest that explains the necessity for the dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would at least suggest to add a comment in the Manifest that explains the necessity for the dependency.
Manifest can't have comments. Another alternative would be additional.bundles in the build.properties
or a dependency in the pom.xml
or a p2.inf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manifest can't have comments
Just out of interest: did that change at some point in time? Because in a former project, several years ago, I had comments in a Manifest (but I do not remember the syntax).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manifest can't have comments
Just out of interest: did that change at some point in time? Because in a former project, several years ago, I had comments in a Manifest (but I do not remember the syntax).
It didn't change. But an OSGi framework is supposed to ignore Headers it doesn't understand. So you can have a Comment: Some remark
header as long as all characters are permitted.
In general I agree with your concern, that's why I added an explanation in the commit message (that is then hopefully found).
But moving it to the build.properties is probably the best solution here.
Will prepare a follow-up tonight.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A header is not a comment... manifests are meant to be processed by tools not humans that why the specification is rather "odd" and its wide use makes its near to impossible to change (e.g. the stupid no more than 72 bytes (not characters) rule) even though I don't know any manifest parser that enforces the rule (including java)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarification. Now I remember that we used a Comment: ...
header, knowing that it was actually a misuse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A header is not a comment... manifests are meant to be processed by tools not humans
That's right. But just because one can doesn't mean one should do something. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #1017.
Optional performance tests rely on prebuilt SWT components to be available. `mvn install` is essential for this.
Optional performance tests rely on prebuilt SWT components to be available. `mvn install` is essential for this.
Optional performance tests rely on prebuilt SWT components to be available. `mvn install` is essential for this.
All the fragments can build in parallel so this should speed-up the build.