Hi,
I am facing a strange issue when trying to run PDE JUnit tests using mockito.
Short summary:
The Plug-In tab in the launch config allows to either select "all workspace and enabled target plugins" or to select dedicated plugins. Even when I manually select all Plug-ins from workspace and target platform, such launches show different behavior to one where "all workspace and enabled target plugins" was selected. Is there a way to find out what is changed in the launch?
Details:
I was trying to run PDE tests using Mockito. When running in the IDE using the "Run as / JUnit Plug-in Test" context menu everything works as expected. Same tests fail with tycho giving me a Mocking exception:
Cannot call abstract real method on java object!
Calling real methods is only possible when mocking non abstract method.
So I thought: same code, same Mockito version, same target - might be a missing plugin?
I changed the run target in the IDE from "all workspace and enabled target plugins" to "plug-ins selected below only" and enabled all workspace and target plugins. Interestingly now the tests fail in the IDE, too! Reverting back the run target to "plug-ins selected below only" does not solve the issue anymore. The run target will now fail permanently.
I further tried to store the run target definition in the workspace and compare the *.launch files. Even if I revert the file back to its original (working) state, the tests fail. Only chance to make them work again is to delete the launch config and to recreate it from the context menu. So the problem seems to exist in some cached data. Anyone to bring some insight to this?
best regards
Christian