Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1246

Surefire + Cobertura: Shutdown of Forked JVM timeouts before all thread ends

    Details

      Description

      There should be a possibility to configure the Embedded shutdown timeout, to a value greater than 30 seconds.

      When using cobertura to evaluate the code coverage, and with a big number of tests to run, the surefire plugin does not wait for cobertura writes all cobertura information to cobertura.ser because the 30 seconds embedded shutdown timeout is not sufficient.

      Is it possible to add a configuration property to surefire-plugin to configure the embedded timeout time?

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build maven-surefire-junit5 #8 (See https://builds.apache.org/job/maven-surefire-junit5/8/)
        SUREFIRE-1246 Surefire + Cobertura: Shutdown of Forked JVM timeouts (tibor17: rev 2c6105c5e5a1d148e2edcbc385bb2ed66969e667)

        • (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
        • (edit) maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
        • (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProviderFactory.java
        • (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/BaseProviderFactory.java
        • (edit) surefire-api/src/main/java/org/apache/maven/surefire/providerapi/ProviderParameters.java
        • (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java
        • (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java
        • (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProviderConfiguration.java
        • (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireExecutionParameters.java
        • (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireReflector.java
        • (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
        • (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java
        • (edit) maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java
        • (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerProviderConfigurationTest.java
        • (edit) maven-surefire-plugin/src/site/apt/examples/shutdown.apt.vm
        • (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterConstants.java
          SUREFIRE-1246 Surefire + Cobertura: Shutdown of Forked JVM timeouts (tibor17: rev 9dc15743de2c9ba189837d41752cf973507d6c31)
        • (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProviderConfiguration.java
        • (edit) maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-surefire-junit5 #8 (See https://builds.apache.org/job/maven-surefire-junit5/8/ ) SUREFIRE-1246 Surefire + Cobertura: Shutdown of Forked JVM timeouts (tibor17: rev 2c6105c5e5a1d148e2edcbc385bb2ed66969e667) (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java (edit) maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProviderFactory.java (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/BaseProviderFactory.java (edit) surefire-api/src/main/java/org/apache/maven/surefire/providerapi/ProviderParameters.java (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProviderConfiguration.java (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireExecutionParameters.java (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireReflector.java (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java (edit) maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerProviderConfigurationTest.java (edit) maven-surefire-plugin/src/site/apt/examples/shutdown.apt.vm (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterConstants.java SUREFIRE-1246 Surefire + Cobertura: Shutdown of Forked JVM timeouts (tibor17: rev 9dc15743de2c9ba189837d41752cf973507d6c31) (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProviderConfiguration.java (edit) maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build maven-surefire #1632 (See https://builds.apache.org/job/maven-surefire/1632/)
        SUREFIRE-1246 Surefire + Cobertura: Shutdown of Forked JVM timeouts (tibor17: rev 9dc15743de2c9ba189837d41752cf973507d6c31)

        • (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProviderConfiguration.java
        • (edit) maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-surefire #1632 (See https://builds.apache.org/job/maven-surefire/1632/ ) SUREFIRE-1246 Surefire + Cobertura: Shutdown of Forked JVM timeouts (tibor17: rev 9dc15743de2c9ba189837d41752cf973507d6c31) (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProviderConfiguration.java (edit) maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
        Show
        tibor17 Tibor Digana added a comment - https://git-wip-us.apache.org/repos/asf?p=maven-surefire.git;a=commit;h=9dc15743de2c9ba189837d41752cf973507d6c31
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build maven-surefire #1623 (See https://builds.apache.org/job/maven-surefire/1623/)
        SUREFIRE-1246 Surefire + Cobertura: Shutdown of Forked JVM timeouts (tibor17: rev 2c6105c5e5a1d148e2edcbc385bb2ed66969e667)

        • (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java
        • (edit) maven-surefire-plugin/src/site/apt/examples/shutdown.apt.vm
        • (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProviderFactory.java
        • (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/BaseProviderFactory.java
        • (edit) maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java
        • (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireReflector.java
        • (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java
        • (edit) maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
        • (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterConstants.java
        • (edit) surefire-api/src/main/java/org/apache/maven/surefire/providerapi/ProviderParameters.java
        • (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireExecutionParameters.java
        • (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
        • (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerProviderConfigurationTest.java
        • (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java
        • (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
        • (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProviderConfiguration.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-surefire #1623 (See https://builds.apache.org/job/maven-surefire/1623/ ) SUREFIRE-1246 Surefire + Cobertura: Shutdown of Forked JVM timeouts (tibor17: rev 2c6105c5e5a1d148e2edcbc385bb2ed66969e667) (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java (edit) maven-surefire-plugin/src/site/apt/examples/shutdown.apt.vm (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProviderFactory.java (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/BaseProviderFactory.java (edit) maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java (edit) surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireReflector.java (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java (edit) maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterConstants.java (edit) surefire-api/src/main/java/org/apache/maven/surefire/providerapi/ProviderParameters.java (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireExecutionParameters.java (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerProviderConfigurationTest.java (edit) maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java (edit) maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java (edit) surefire-booter/src/main/java/org/apache/maven/surefire/booter/ProviderConfiguration.java
        Hide
        tibor17 Tibor Digana added a comment -

        commit 2c6105c5e5a1d148e2edcbc385bb2ed66969e667

        Show
        tibor17 Tibor Digana added a comment - commit 2c6105c5e5a1d148e2edcbc385bb2ed66969e667
        Hide
        tibor17 Tibor Digana added a comment -

        The text of the documentation changed to:

        • Forked process is normally terminated without any significant delay after given tests have completed.
        • If the particular tests started non-daemon Thread(s), the process hangs instead of been properly terminated
        • by <em>System.exit()</em>. Use this parameter in order to determine the timeout of terminating the process.
        • <a href="http://maven.apache.org/surefire/maven-surefire-plugin/examples/shutdown.html">see the documentation:
        • http://maven.apache.org/surefire/maven-surefire-plugin/examples/shutdown.html</a>
        Show
        tibor17 Tibor Digana added a comment - The text of the documentation changed to: Forked process is normally terminated without any significant delay after given tests have completed. If the particular tests started non-daemon Thread(s), the process hangs instead of been properly terminated by <em>System.exit()</em>. Use this parameter in order to determine the timeout of terminating the process. <a href="http://maven.apache.org/surefire/maven-surefire-plugin/examples/shutdown.html">see the documentation: http://maven.apache.org/surefire/maven-surefire-plugin/examples/shutdown.html </a>
        Show
        tibor17 Tibor Digana added a comment - The page will be updated https://maven.apache.org/surefire/maven-surefire-plugin/examples/shutdown.html
        Hide
        ipinheiro Ivo Pinheiro added a comment -

        Tibor Digana thank for your quick response.
        The solucionar you haver proposed seems that will work, and will be flexible according the developers needs.
        When do you think this chance will be available on a release?

        Show
        ipinheiro Ivo Pinheiro added a comment - Tibor Digana thank for your quick response. The solucionar you haver proposed seems that will work, and will be flexible according the developers needs. When do you think this chance will be available on a release?
        Hide
        tibor17 Tibor Digana added a comment -

        Ivo Pinheiro
        We can introduce a parameter forkedProcessExitTimeoutInSeconds which will be standing in the list very close to
        https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#forkedProcessTimeoutInSeconds

        The parameter forkedProcessExitTimeoutInSeconds might be specified as follows:
        Kill the forked test process after finished test-set executed java.lang.System.exit(int) times out a certain number of seconds. If set to 0, wait forever for the process, never timing out.

        Show
        tibor17 Tibor Digana added a comment - Ivo Pinheiro We can introduce a parameter forkedProcessExitTimeoutInSeconds which will be standing in the list very close to https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#forkedProcessTimeoutInSeconds The parameter forkedProcessExitTimeoutInSeconds might be specified as follows: Kill the forked test process after finished test-set executed java.lang.System.exit(int) times out a certain number of seconds. If set to 0, wait forever for the process, never timing out.

          People

          • Assignee:
            tibor17 Tibor Digana
            Reporter:
            ipinheiro Ivo Pinheiro
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development