[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Class loader, class space, protection domai, package private things and fragments

Hi Tom!

On 2014-07-18 19:09:02 +0000, Thomas Watson said:

Are your troubles when you run the fragment in the Equinox/OSGi environment or is it when using Mockito/CGLIB outside of an OSGi environment?  If it is the later then are you running into issues with signing?  Or perhaps you could clarify the issue you are running into because I just realized that it is not clear to me ;-)
I fixed the problems with signing upstream in cglib. :) Hopefully it ends up in Mockito one day.

But the other problem I have with Mockito is that it can't mock package private methods in an OSGi environment. It works outside of OSGi. Thus, when a class is defined in a bundle and has package private methods, those methods can be accessed in the test fragment. However, mocking those fails in OSGi. Oh and to make the problem even more complex, it does not fail when run as "JUnit Plug-in Test" from within Eclipse but when run as Tycho Surefire test from within a Maven Tycho build. But as soon as I make the methods protected it works.

-Gunnar


-- Gunnar Wagenknecht gunnar@xxxxxxxxxxxxxxx