Erreur lors de l'exécution du plugin de test maven surefire Java 11


J'exécute quelques tests pour l'application Spring Boot dans Team City en utilisant le plugin maven surefire version 2.22.1. Printemps version de Démarrage est 2.1.2. J'ai spécifié dans la configuration d'utiliser une jvm Java 11 fourchue comme suit:

            <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <forkCount>1</forkCount>
                <jvm>${jdk11.home}/bin/java</jvm>
                <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
            </configuration>
        </plugin>

Lors de l'exécution de Team City, j'obtiens l'erreur dans le journal:

    [11:07:59][Step 6/6] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project ep-elm-web: There are test failures.
[11:07:59][Step 6/6] [ERROR] 
[11:07:59][Step 6/6] [ERROR] Please refer to /opt/*******/buildAgent/work/3c34aba90580ae72/ep-elm-web/target/surefire-reports for the individual test results.
[11:07:59][Step 6/6] [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[11:07:59][Step 6/6] [ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[11:07:59][Step 6/6] [ERROR] Command was /bin/sh -c cd /opt/*******/buildAgent/work/3c34aba90580ae72/ep-elm-web && /opt/jdk-11.0.2/bin/java -Xmx1024m -XX:MaxPermSize=256m -javaagent:/opt/*******/buildAgent/tools/jacoco.0.7.5/jacocoagent.jar=append=true,destfile=/opt/*******/buildAgent/temp/buildTmp/JACOCO158546265956865605coverage/jacoco.exec org.apache.maven.surefire.booter.ForkedBooter /opt/*******/buildAgent/work/3c34aba90580ae72/ep-elm-web/target/surefire 2019-02-20T11-07-58_396-jvmRun1 surefire6001620761776512056tmp surefire_02647190773594316116tmp
[11:07:59][Step 6/6] [ERROR] Error occurred in starting fork, check output in log
[11:07:59][Step 6/6] [ERROR] Process Exit Code: 134
[11:07:59][Step 6/6] [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[11:07:59][Step 6/6] [ERROR] Command was /bin/sh -c cd /opt/*******/buildAgent/work/3c34aba90580ae72/ep-elm-web && /opt/jdk-11.0.2/bin/java -Xmx1024m -XX:MaxPermSize=256m -javaagent:/opt/*******/buildAgent/tools/jacoco.0.7.5/jacocoagent.jar=append=true,destfile=/opt/*******/buildAgent/temp/buildTmp/JACOCO158546265956865605coverage/jacoco.exec org.apache.maven.surefire.booter.ForkedBooter /opt/*******/buildAgent/work/3c34aba90580ae72/ep-elm-web/target/surefire 2019-02-20T11-07-58_396-jvmRun1 surefire6001620761776512056tmp surefire_02647190773594316116tmp
[11:07:59][Step 6/6] [ERROR] Error occurred in starting fork, check output in log
[11:07:59][Step 6/6] [ERROR] Process Exit Code: 134
[11:07:59][Step 6/6] [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669) 

J'ai continué à vérifier la sortie dans le fichier journal et voici ce que j'obtiens:

Corrupted STDOUT by directly writing to native stream in forked JVM 1. Stream 'FATAL ERROR i
n native method: processing of -javaagent failed'.
java.lang.IllegalArgumentException: Stream stdin corrupted. Expected comma after third chara
cter in command 'FATAL ERROR in native method: processing of -javaagent failed'.
        at org.apache.maven.plugin.surefire.booterclient.output.ForkClient$OperationalData.<
init>(ForkClient.java:507)
        at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.processLine(ForkC
lient.java:210)
        at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkC
lient.java:177)
        at org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumpe
r.run(ThreadedStreamConsumer.java:88)
        at java.lang.Thread.run(Thread.java:745

)

Quelqu'un A rencontré ce problème et est-il un moyen de le résoudre?

Author: Mikhail Kholodkov, 2019-02-20