Support JUnit 6 plug-in test launches#2109
Conversation
|
First error I run into: The available bundles seem fine... Maybe something to do with the removal of |
Test Results 771 files ± 0 771 suites ±0 58m 30s ⏱️ + 6m 51s Results for commit 3faacd2. ± Comparison against base commit b00ef59. This pull request removes 3 and adds 14 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
|
Next error is: |
|
@trancexpress we have added some import restirctions on some other parts of PDE/JDT that are used here. Beside that, I would like to first see a successful run in pure JDT (is this already possible?) and maybe one should delay PDE support to next release... it really do not bring any value right now. |
I'll check what needs to change, no problem.
Only with the 2 PRs linked in #2108:
The SDK build is broken, so we cannot merge either. But once we merge them, yes, plain JUnit tests run with JUnit 6.
We would have to add some sort of validation on the launch, and more. Right now the launch defaults to JUnit 6, as soon as eclipse-jdt/eclipse.jdt.ui#2560 is used. For plug-in tests we'll need to filter out the JUnit 6 option, if we are delaying PDE support by a release. How much time do we have @iloveeclipse ? |
Ideally "bigger" changes should be done before M3 planned for next thursday/friday. |
|
With the latest changes here, as well as eclipse-jdt/eclipse.jdt#145 and |
With JUnit 5, correct? Because it is what manifest says. |
|
@laeubi it would be great if you can take a look. If you think we should delay JUnit 6 support until the next release, so that we get more manual testing, I think that would be fine as well. But we'll need to disable the plug-in test launch JUnit 6 choice. Unless we delay the entire JUnit 6 choice in launches. |
One set of manifest and sources with JUnit 5, the other set of manifest and sources with JUnit 6. |
7af4a00 to
a9767d3
Compare
|
Seems like we don't have a build with the latest JUnit 6 changes in JDT UI. We'll have to wait more here. I also see problems with #2113, maybe it will be best to include the new tests here. Similar to the JDT UI PR/tests. |
Yes, tonight's I-build failed but I have already prepared a fix and I'm currently in the process of verifying it.
I think that makes sense to have the new functionality tested immediately. This also makes it simpler to review and test this change. |
|
Looks like JUnit 4 vintage test plug-in launches are broken with changes here. Among other problems I see in tests. It might be good to look into disabling the JUnit 6 choice for plug-in test launches, in case we don't manage to fix everything that doesn't work until the end of the next week. |
8a9777c to
92f906d
Compare
|
There are still some fails, but I have no idea what the problem is: The I find no exception stack traces anywhere. I also can't find the log files from the test workspace... In case there is some logged errors. Even the workspace passed with Copying the test projects and manually launching the test cases / suites / packages works fine... |
|
Triggered https://ci.eclipse.org/releng/job/Builds/job/I-build-4.38/113/ to see eclipse-jdt/eclipse.jdt.ui#2626 change in PDE. |
|
@laeubi lets move the discussion from #2111 (comment) to here. See the current state: Not copying the projects in the test resources (in If you insist on this, IMO lets start that rewrite as a separate ticket. |
656853c to
5589556
Compare
|
Looks like Jenkins can't fetch the commit from fork again:
Could be related to https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/6858 but could be another issue... |
|
The Windows job ran into this failure: Here the same test fails but for JUnit 5 and for the Linux job: Will have to investigate this, I guess we open an issue for it. |
|
Another instability, this time in the Mac tests: @iloveeclipse I suggest we merge this. |
iloveeclipse
left a comment
There was a problem hiding this comment.
I only reviewed in browser, change sounds good, just small style issue.
| private static final Bundle BUNDLE = FrameworkUtil.getBundle(Caller.class); | ||
| private static final Bundle loaderBundle; | ||
| private static final Bundle BUNDLE; | ||
| private static final Bundle loaderBundleJUnit5; |
There was a problem hiding this comment.
Two constants should be upper case
...pse.pde.junit.runtime/src/org/eclipse/pde/internal/junit/runtime/RemotePluginTestRunner.java
Show resolved
Hide resolved
HannesWell
left a comment
There was a problem hiding this comment.
Thank you @trancexpress for this enhancement. Great work!
And I'm glad to see that we have JUnit-6 support for PDE as well (soon).
I have reviewed and tested this and as far as I can tell, it works well.
I have just pushed a small update to address a few minor style issues (besides other the one from Andrey), also to make the code a bit more strict.
This update also includes the missing consideration of the version range I mentioned before.
With that I think this is ready.
If you want to apply more changes, please make sure to fetch the latest state before.
iloveeclipse
left a comment
There was a problem hiding this comment.
LGTM.
I've also smoke tested various use cases, with/without launch config dialogs, with/without JUnit5/6 dependencies, so far no problems found.
Let's merge.
Fixes: #2108