JMockit - initialization problem

后端 未结 7 1223
情话喂你
情话喂你 2020-12-01 20:33

When I use the following test I get a WARNING:

WARNING: JMockit was initialized on demand, which may cause certain tests to fail; please check the d

相关标签:
7条回答
  • 2020-12-01 21:23

    In addition to Gary Rowe's solution:

    A more robust (i.e. version and repository path agnostic) integration of JMockit into Surefire would be

    <argLine>-javaagent:${org.jmockit:jmockit:jar}
    

    To make this resolution work, the maven-dependency-plugin (version >= 2.5.1!) needs to be configured like this:

    <plugin>
    <artifactId>maven-dependency-plugin</artifactId>
    <version>2.5.1</version>
    <executions>
        <execution>
            <id>getClasspathFilenames</id>
            <goals>
                <goal>properties</goal>
            </goals>
        </execution>
    </executions>
    

    0 讨论(0)
提交回复
热议问题