Open GoogleCodeExporter opened 8 years ago
[deleted comment]
unit test attached. Very simple but fails to run with exceptions.
runnerTrace.txt is the stack trace generated from the test using @Runas
annotation. This is due to line 187 in AbstractTestSuiteChunkerImpl:
registerProxyframework(defaultMockLoader); // default class loader of thread
Classloader is neither the test class's classloader or the powermock plugin's
class loader. Seems to be a random class loader from another plugin (maybe the
application class loader)
Changing this line to:
registerProxyframework(this.getClass().getClassLoader()); // powermock plugin's
loader
gets past this exception but then ClassNotFoundExceptions occur later when the
testChunk's test is attempted to be loaded using the powermock plugin's class
loader.
The use of Eclipse buddying makes no difference either.
Any thoughts most appreciated.
Original comment by enigm...@googlemail.com
on 8 Jun 2012 at 12:35
Attachments:
This is quite complicated stuff. If you need to use PowerMock inside an Eclipse
PDE suite then I suggest you to use a Java agent based JUnit rule instead (see
front page documentation).
Original comment by johan.ha...@gmail.com
on 13 Jul 2012 at 7:11
Original issue reported on code.google.com by
enigm...@googlemail.com
on 8 Jun 2012 at 12:20