Сбой PiTest в сборке CI maven с «Входной байтовый массив имеет неправильный 4-байтовый конечный модуль» даже без изменений исходного кода - PullRequest
0 голосов
/ 28 июня 2019

Сбой сборки CI при достижении цели org.pitest: mutationCoverage при отправке нового кода.В моем наборе патчей нет изменений в исходном коде (только новый, пустой коммит), но выводится следующая ошибка:

16:49:26 [ERROR] Failed to execute goal org.pitest:pitest-maven:1.4.0:mutationCoverage (default) on project common-scheduler: Execution default of goal org.pitest:pitest-maven:1.4.0:mutationCoverage failed: Input byte array has wrong 4-byte ending unit -> [Help 1]
16:49:26 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.pitest:pitest-maven:1.4.0:mutationCoverage (default) on project common-scheduler: Execution default of goal org.pitest:pitest-maven:1.4.0:mutationCoverage failed: Input byte array has wrong 4-byte ending unit
16:49:26     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
16:49:26     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
16:49:26     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
16:49:26     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
16:49:26     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
16:49:26     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
16:49:26     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
16:49:26     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
16:49:26     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
16:49:26     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
16:49:26     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
16:49:26     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
16:49:26     at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
16:49:26     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
16:49:26     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
16:49:26     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
16:49:26     at java.lang.reflect.Method.invoke (Method.java:497)
16:49:26     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
16:49:26     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
16:49:26     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
16:49:26     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
16:49:26 Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.pitest:pitest-maven:1.4.0:mutationCoverage failed: Input byte array has wrong 4-byte ending unit
16:49:26     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
16:49:26     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
16:49:26     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
16:49:26     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
16:49:26     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
16:49:26     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
16:49:26     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
16:49:26     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
16:49:26     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
16:49:26     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
16:49:26     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
16:49:26     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
16:49:26     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
16:49:26     at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
16:49:26     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
16:49:26     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
16:49:26     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
16:49:26     at java.lang.reflect.Method.invoke (Method.java:497)
16:49:26     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
16:49:26     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
16:49:26     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
16:49:26     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
16:49:26 Caused by: java.lang.IllegalArgumentException: Input byte array has wrong 4-byte ending unit
16:49:26     at java.util.Base64$Decoder.decode0 (Base64.java:704)
16:49:26     at java.util.Base64$Decoder.decode (Base64.java:526)
16:49:26     at java.util.Base64$Decoder.decode (Base64.java:549)
16:49:26     at org.pitest.mutationtest.incremental.ObjectOutputStreamHistoryStore.deserialize (ObjectOutputStreamHistoryStore.java:126)
16:49:26     at org.pitest.mutationtest.incremental.ObjectOutputStreamHistoryStore.restoreResults (ObjectOutputStreamHistoryStore.java:101)
16:49:26     at org.pitest.mutationtest.incremental.ObjectOutputStreamHistoryStore.initialize (ObjectOutputStreamHistoryStore.java:87)
16:49:26     at org.pitest.mutationtest.tooling.MutationCoverage.runReport (MutationCoverage.java:132)
16:49:26     at org.pitest.mutationtest.tooling.EntryPoint.execute (EntryPoint.java:116)
16:49:26     at org.pitest.mutationtest.tooling.EntryPoint.execute (EntryPoint.java:49)
16:49:26     at org.pitest.maven.RunPitStrategy.execute (RunPitStrategy.java:35)
16:49:26     at org.pitest.maven.AbstractPitMojo.analyse (AbstractPitMojo.java:436)
16:49:26     at org.pitest.maven.AbstractPitMojo.execute (AbstractPitMojo.java:377)
16:49:26     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
16:49:26     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
16:49:26     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
16:49:26     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
16:49:26     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
16:49:26     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
16:49:26     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
16:49:26     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
16:49:26     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
16:49:26     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
16:49:26     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
16:49:26     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
16:49:26     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
16:49:26     at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
16:49:26     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
16:49:26     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
16:49:26     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
16:49:26     at java.lang.reflect.Method.invoke (Method.java:497)
16:49:26     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
16:49:26     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
16:49:26     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
16:49:26     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
16:49:26 [ERROR] 
16:49:26 [ERROR] 
16:49:26 [ERROR] For more information about the errors and possible solutions, please read the following articles:
16:49:26 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
16:49:26 [ERROR] 
16:49:26 [ERROR] After correcting the problems, you can resume the build with the command
16:49:26 [ERROR]   mvn <goals> -rf :common-scheduler
16:49:26 Build step 'Invoke top-level Maven targets' marked build as failure
16:49:26 Archiving artifacts

Я включил подробное ведение журнала для PiTest и отладочное ведение журнала для maven, а невидеть что-либо в журналах.Ничего похожего с этой ошибкой в ​​сети тоже не вижу.

Конфигурация плагина:

<plugin>
  <groupId>org.pitest</groupId>
  <artifactId>pitest-maven</artifactId>
  <version>1.4.0</version>
  <configuration>
    <analyseLastCommit>true</analyseLastCommit>
    <avoidCallsTo>
      <avoidCallsTo>org.slf4j</avoidCallsTo>
    </avoidCallsTo>
    <excludedClasses>
      <param>*Exception</param>
    </excludedClasses>
    <excludedMethods>
      <param>toString</param>
      <param>hashCode</param>
      <param>equals</param>
      <param>getInstance</param>
    </excludedMethods>
    <failWhenNoMutations>false</failWhenNoMutations>
    <outputFormats>xml,html</outputFormats>
    <skip>${skip-pitest}</skip>
    <withHistory>true</withHistory>
  </configuration>
</plugin>

Я изо всех сил пытаюсь понять, откуда исходит ошибка, так как она не кажетсясвязан с любыми изменениями кода, но происходит с каждым новым набором патчей.

1 Ответ

0 голосов
/ 01 июля 2019

Поднял вопрос на github для PiTest: https://github.com/hcoles/pitest/issues/629

Проблема в поврежденном файле истории.Очистка окружающей среды и повторный запуск разобрали вещи.

...