-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PowerMock Agent and TestNG 6.9.+ #1001
Comments
Strange behavior and I'm not familiar with agent or bytecode. But I found some links: As I understand them, it could work out-of-the-box with java7 specific options. The next question will be: where exactly and why is stackmap missing? Is there some generated code somewhere? |
I've also found that Has been changed version of JDK which is used to build TestNG? Or any other environment changing since 6.8.22 ? |
TestNG 6.9.4 dropped Java6 support: https://github.com/cbeust/testng/blob/master/CHANGES.txt#L83 And I still don't understand why it is working well without agent. |
Finally, I've figured out what happen. It's there complex issue and several little mistakes and issue evolve into such stranger defect.
Result: incorrect byte generation -> Why it's working well without agent? Because, without agent we can what we want with class and we use Javassist to remove Thank you! I'm closing the issue. |
👍 Thank for the explaination! And happy to know it will be fixed :) |
Indeed, thanks for the detective work, @thekingnothing, very impressive! |
I'm working on following issue powermock/powermock#640
Everything fine in case if PowerMock and TestNG are sued without attaching javaagent, but in case if a user wants use PowerMock Java Agent instead
PowerMockObjectFactory
then the following exception is thrownAnd it's issue only with TestNG 6.9+. I cannot figure out what changed in TestNG since 6.8.22. I see it Git history that the
ObjectFactoryImpl
has not been changed since 6.8.22 release.By the way, PowerMock javaagent in this case doesn't modified the
ObjectFactoryImpl
class.I create the sample which can help to reproduce the issue
https://github.com/thekingnothing/testng-sample
Could you help me?
The text was updated successfully, but these errors were encountered: