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
Trying to build project with jMockit & TestNG via gradle. Locally everything is working great. Exactly the same thing going through TeamCity is somehow messed up. It seems that jMockit cannot execute properly setup method which has @BeforeClass annotation. To be fair it won't work with junit annotation either when setting things up before executing tests. Here's the part of listing that i'm mostly concerned about:
Caused by: java.lang.IllegalStateException: Cannot use Attach API on unknown OS: FreeBSD
at mockit.internal.startup.AgentLoader.findVirtualMachineClassAccordingToOS(AgentLoader.java:103)
at mockit.internal.startup.AgentLoader.getVirtualMachineImplementationFromEmbeddedOnes(AgentLoader.java:62)
at mockit.internal.startup.AgentLoader.loadAgent(AgentLoader.java:45)
at mockit.internal.startup.Startup.verifyInitialization(Startup.java:172)
at mockit.MockUp.(MockUp.java:94)
Does it work if sun.tools.attach.BsdVirtualMachine is used when "os.name" = "FreeBSD"? I can easily make this change in AgentLoader.java (at line 96), but I won't be able to test it.
Yup, i hotswapped and patched AgentLoader and i can confirm adding simple || osName.startsWith("FreeBSD") at line 96 along Mac OS X option does the trick. It would be great if you could ammend this yourself in your codebase - no need for MR for such trivial change i think. I'll use my monkey patch for the time being. Let me know when it's done.
Trying to build project with jMockit & TestNG via gradle. Locally everything is working great. Exactly the same thing going through TeamCity is somehow messed up. It seems that jMockit cannot execute properly setup method which has
@BeforeClass
annotation. To be fair it won't work with junit annotation either when setting things up before executing tests. Here's the part of listing that i'm mostly concerned about:Caused by: java.lang.IllegalStateException: Cannot use Attach API on unknown OS: FreeBSD
at mockit.internal.startup.AgentLoader.findVirtualMachineClassAccordingToOS(AgentLoader.java:103)
at mockit.internal.startup.AgentLoader.getVirtualMachineImplementationFromEmbeddedOnes(AgentLoader.java:62)
at mockit.internal.startup.AgentLoader.loadAgent(AgentLoader.java:45)
at mockit.internal.startup.Startup.verifyInitialization(Startup.java:172)
at mockit.MockUp.(MockUp.java:94)
The text was updated successfully, but these errors were encountered: