Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PluginsNotLoadedTest fails complaining about loaded o.e.jdt.junit bundle
Follow up from eclipse-jdt/eclipse.jdt.core#2536. After switching to minimal 1.8 project compliance in JDT, test `PluginsNotLoadedTest.pluginsNotLoaded` fails complaining about loaded org.eclipse.jdt.junit bundle. See https://download.eclipse.org/eclipse/downloads/drops4/I20240725-1800/testresults/html/org.eclipse.jdt.text.tests_ep433I-unit-cen64-gtk3-java22_linux.gtk.x86_64_22.html Interestingly, it doesn't fail on both Mac platforms, but see below. While debugging (break point at `org.eclipse.jdt.internal.junit.ui.JUnitPlugin.start(BundleContext)`) one can see that the class is loaded at `org.eclipse.jdt.text.tests.MarkOccurrenceTest.markMethodOccurrences()` test, which, surprisingly ... opens Java editor on `junit.framework.TestCase` class and that one tries to draw warning marker annotations that in turn activate warning marker quick fix processor `org.eclipse.jdt.internal.junit.ui.JUnitQuickFixProcessor` that triggers JUnit loading. Not clear why this doesn't work on Mac, probably drawing there is a bit different and so no JUnit bundle is loaded. To solve that, let run PluginsNotLoadedTest as first test in the test suite (not sure why it wasn't done before). Also while debugging the test I saw that the JUnit bundle is not loaded if the welcome page was open, which was hiding opened Java editor and that in turn didn't activated all of Java editor functionality. So let close welcome page, which should have been done anyway for any UI test.
- Loading branch information