Bug 579521

Summary: JUnit Plug-in test does not work with Fragment-Host
Product: [Eclipse Project] PDE Reporter: Tom Vandenbussche <tom>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: lumi, titouan.vervack, Vikas.Chandra, wim.jongman
Version: 4.23   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Tom Vandenbussche CLA 2022-03-31 06:03:57 EDT
When trying to run a JUnit Plug-in test for a test plugin that uses `Fragment-Host` in the MANIFEST.MF (which refers to the plugin being tested) I get a dialog with the message:

  'Launching my.plugin.test' has encountered a problem.
  Required plug-in 'my-plugin' could not be found.

If I instead of using `Fragment-Host` add the plugin to my required bundles (and expose the relevant packages in the plugin) then I get no issues. Upon further investigation I noticed that removing the `bundle-version` part also fixes the issue.

The problem started occurring since Eclipse 4.23, before that I did not have any issues.

Version: 2022-03 (4.23.0)
Build id: 20220310-1457
Comment 1 Wim Jongman CLA 2022-03-31 06:17:32 EDT
Tom, did you try a clean build?
Comment 2 Tom Vandenbussche CLA 2022-03-31 07:36:01 EDT
Yes I tried many things, including a clean build, but none of them solved the issue. I have the same problem on multiple devices and a colleague of mine had it too, all after updating to Eclipse 2022-03. The only solution I found was changing the following in my MANIFEST.MF:

  Fragment-Host: my.plugin;bundle-version="[1.2.0,1.2.1)"

into

  Fragment-Host: my.plugin

Though that doesn't seem a good solution to me since it is preferable to define the bundle version. Also it worked without issues on earlier versions of Eclipse, and there is no issues when running with Tycho either.
Comment 3 Lumir Navrat CLA 2023-04-12 03:19:26 EDT
Hi I could confirm this bug too.
my eclipse is E2023-03 now and see this issue for longer time with older versions too. Not sure if last working was E2022-03 or E2022-06.

Tycho builds via maven from cmdline works normally.

And mentioned workaround:

Fragment-Host: de.ids.acos.et.client.app;bundle-version="[42501.0.0,42501.0.1)"

=>
Fragment-Host: de.ids.acos.et.client.app

works too.
Comment 4 Vikas Chandra CLA 2023-04-12 03:29:31 EDT
Please open an issue here https://github.com/eclipse-pde/eclipse.pde/issues
Comment 5 Lumir Navrat CLA 2023-04-12 03:43:33 EDT
done: https://github.com/eclipse-pde/eclipse.pde/issues/571