简体   繁体   中英

PITest hangs at start of test run

I'm trying to run PITest on the master version of light4j ( https://github.com/networknt/light-4j ), a project I selected more or less at random to try out PITest on real world code.

The test completed fine on most modules, except for the 'cient' module of light4j. When running

mvn -X test org.pitest:pitest-maven:mutationCoverage

In the light-4j/client folder the normal unit test run completes (all tests are ok, 3 skipped), but PITest doesn't seem to generate and execute mutations. The last messages are

[INFO] Adding org.pitest:pitest to SUT classpath
[INFO] Mutating from /Users/jan/dev/inno/light-4j/client/target/classes
[INFO] Defaulting target classes to match packages in build directory
/-\|/-\|/-\|/-\|/-stderr  : WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.xnio.nio.NioXnio$2 (file:/Users/jan/.m2/repository/org/jboss/xnio/xnio-nio/3.3.8.Final/xnio-nio-3.3.8.Final.jar) to constructor sun.nio.ch.KQueueSelectorstderr  : Provider()
WARNING: Please consider reporting this to the maintainers of org.xnio.nio.NioXnio$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in astderr  :  future release

And nothing happens after that.

The normal build of light4j completes successfully.

What could be the problem?

[edit on Feb 5th, 2020: I've forked the light4j repo: https://github.com/jvermeir/light-4j Then I executed a normal build mvn clean install so all artifacts are in my local maven repository. Next I changed the pom.xml at the root level of the light4j project, adding

<plugin>
    <groupId>org.pitest</groupId>
    <artifactId>pitest-maven</artifactId>
    <version>1.4.10</version>
    <dependencies>
<!--                    <dependency>-->
<!--                        <groupId>org.pitest</groupId>-->
<!--                        <artifactId>pitest-junit5-plugin</artifactId>-->
<!--                        <version>0.10</version>-->
<!--                    </dependency>-->
    </dependencies>
</plugin>

in the build section Finally I executed the tests with PiTest enabled from the client folder: mvn -X test org.pitest:pitest-maven:mutationCoverage > ../buildlog.txt This results in a build.txt file, but also in a couple of lines that show up in the terminal:

17:10:30 PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue.
17:10:30 PIT >> INFO : Sending 147 test classes to minion
17:10:30 PIT >> INFO : Sent tests to minion
17:10:30 PIT >> INFO : MINION : 17:10:30 PIT >> INFO : Checking environment

17:10:32 PIT >> INFO : MINION : 17:10:32 PIT >> INFO : Found  18 tests

17:10:32 PIT >> INFO : MINION : 17:10:32 PIT >> INFO : Dependency analysis reduced number of potential tests by 0

17:10:32 PIT >> INFO : MINION : 17:10:32 PIT >> INFO : 18 tests received

17:10:33 PIT >> INFO : MINION : WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.powermock.reflect.internal.WhiteboxImpl (file:/Users/jan/.m2/repository/org/powermock/powermock-reflect/2.0.2/powermock-reflect-2.0.2.jar) to method java
17:10:33 PIT >> INFO : MINION : .lang.Object.clone()
WARNING: Please consider reporting this to the maintainers of org.powermock.reflect.internal.WhiteboxImpl
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access
17:10:33 PIT >> INFO : MINION :  operations will be denied in a future release

17:11:24 PIT >> INFO : MINION : 17:11:24 PIT >> WARNING : More threads at end of test (46) com.networknt.client.Http2ClientTest than start. (5)

17:11:24 PIT >> INFO : Calculated coverage in 54 seconds.
17:11:25 PIT >> INFO : Created  92 mutation test units

The end of build.txt looks like this:

[INFO] Adding org.pitest:pitest to SUT classpath
[INFO] Mutating from /Users/jan/dev/inno/light4jfork/light-4j/client/target/classes
[INFO] Defaulting target classes to match packages in build directory
-stderr  : WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.xnio.nio.NioXnio$2 (file:/Users/jan/.m2/repository/org/jboss/xnio/xnio-nio/3.3.8.Final/xnio-nio-3.3.8.Final.jar) to constructor sun.nio.ch.KQueueSelectorstderr  : Provider()
WARNING: Please consider reporting this to the maintainers of org.xnio.nio.NioXnio$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in astderr  :  future release

I have tried the same and it stops at the client module. I am just wondering if we should add pitest-maven plugin to the pom.xml

[INFO] Mutating from /home/steve/networknt/light-4j/client/target/classes
[INFO] Defaulting target classes to match packages in build directory
7:35:54 p.m. PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue.
7:35:54 p.m. PIT >> INFO : Sending 147 test classes to minion
7:35:54 p.m. PIT >> INFO : Sent tests to minion
7:35:54 p.m. PIT >> INFO : MINION : 7:35:54 p.m. PIT >> INFO : Checking environment

7:35:55 p.m. PIT >> INFO : MINION : 7:35:55 p.m. PIT >> INFO : Found  18 tests

7:35:55 p.m. PIT >> INFO : MINION : 7:35:55 p.m. PIT >> INFO : Dependency analysis reduced number of potential tests by 0

7:35:55 p.m. PIT >> INFO : MINION : 7:35:55 p.m. PIT >> INFO : 18 tests received

7:35:56 p.m. PIT >> INFO : MINION : WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.powermock.reflect.internal.WhiteboxImpl (file:/home/steve/.m2/repository/org/powermock/powermock-reflect/2.0.2/powermock-reflect-2.0.2.jar) to method jav
7:35:56 p.m. PIT >> INFO : MINION : a.lang.Object.clone()
WARNING: Please consider reporting this to the maintainers of org.powermock.reflect.internal.WhiteboxImpl
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal acces
7:35:56 p.m. PIT >> INFO : MINION : s operations will be denied in a future release

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM