Closed radekkozak closed 8 years ago
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.
Appreciate it
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)