You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1.create any unit test with a setup() method, which create hadoop local file
system
2.make dumb/empty test method, run the test make sure it pass
3.add @RunWith and @PrepareForTest at the top of the test
What is the expected output? What do you see instead?
test should still pass, but instead i got error message:
java.io.IOException: failure to login
at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:490)
at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:452)
at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:1494)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1395)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:254)
at org.apache.hadoop.fs.FileSystem.getLocal(FileSystem.java:225)
What version of the product are you using? On what operating system?
powermock-module-junit4 1.5.1
powermock-api-mockito 1.5.1
mockito-core 1.9.5-rc1
Mac OS X 10.8.4
Please provide any additional information below.
please see the attached sample code
Original issue reported on code.google.com by marsg...@gmail.com on 26 Aug 2013 at 6:11
I had a similar issue. You can try telling PowerMock to defer the classloading
of specific packages to the system classloader
I was only interested in having PowerMock mock my own packages, so I ignore the
others like this:
@PowerMockIgnore({"javax.management*", "javax.xml.*", "org.w3c.*",
"org.apache.apache.*", "com.sun.*"})
Original comment by t...@quixey.com on 12 Sep 2013 at 10:53
Original issue reported on code.google.com by
marsg...@gmail.com
on 26 Aug 2013 at 6:11Attachments:
The text was updated successfully, but these errors were encountered: