You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2018/04/01 15:33:33 UTC

[maven-surefire] branch master updated: [ForkModeIT] prolonged execution time of IT. Probably virtualization issue of CPU scheduler on Win NT in ASF Jenkins CI.

This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/master by this push:
     new 02d7656  [ForkModeIT] prolonged execution time of IT. Probably virtualization issue of CPU scheduler on Win NT in ASF Jenkins CI.
02d7656 is described below

commit 02d76563e25538ffce6a42b21c10e85bab11a278
Author: Tibor17 <ti...@apache.org>
AuthorDate: Sun Apr 1 17:33:16 2018 +0200

    [ForkModeIT] prolonged execution time of IT. Probably virtualization issue of CPU scheduler on Win NT in ASF Jenkins CI.
---
 .../src/test/java/org/apache/maven/surefire/its/ForkModeIT.java   | 6 +++---
 .../test/resources/fork-mode/src/test/java/forkMode/Test1.java    | 8 ++++++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java
index 574d144..9bbb4b3 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java
@@ -108,7 +108,7 @@ public class ForkModeIT
                 .forkPerThread()
                 .reuseForks( true )
                 .threadCount( 2 )
-                .addGoal( "-DsleepLength=1200" ) );
+                .addGoal( "-DsleepLength=7200" ) );
         assertDifferentPids( pids, 2 );
         assertFalse( "pid 1 is not the same as the main process' pid", pids[0].equals( getMainPID() ) );
     }
@@ -144,7 +144,7 @@ public class ForkModeIT
     public void testForkCountTwoNoReuse()
     {
         String[] pids =
-            doTest( unpack( getProject() ).setForkJvm().forkCount( 2 ).reuseForks( false ).addGoal( "-DsleepLength=1200" ) );
+            doTest( unpack( getProject() ).setForkJvm().forkCount( 2 ).reuseForks( false ).addGoal( "-DsleepLength=7200" ) );
         assertDifferentPids( pids );
         assertFalse( "pid 1 is not the same as the main process' pid", pids[0].equals( getMainPID() ) );
     }
@@ -153,7 +153,7 @@ public class ForkModeIT
     public void testForkCountTwoReuse()
     {
         String[] pids =
-            doTest( unpack( getProject() ).forkCount( 2 ).reuseForks( true ).addGoal( "-DsleepLength=1200" ) );
+            doTest( unpack( getProject() ).forkCount( 2 ).reuseForks( true ).addGoal( "-DsleepLength=7200" ) );
         assertDifferentPids( pids, 2 );
         assertFalse( "pid 1 is not the same as the main process' pid", pids[0].equals( getMainPID() ) );
     }
diff --git a/surefire-its/src/test/resources/fork-mode/src/test/java/forkMode/Test1.java b/surefire-its/src/test/resources/fork-mode/src/test/java/forkMode/Test1.java
index 980123c..7b3f5ed 100644
--- a/surefire-its/src/test/resources/fork-mode/src/test/java/forkMode/Test1.java
+++ b/surefire-its/src/test/resources/fork-mode/src/test/java/forkMode/Test1.java
@@ -46,11 +46,15 @@ public class Test1
     {
         String fileName = test.getName() + "-pid";
         File target = new File( "target" ).getCanonicalFile();  // getCanonicalFile required for embedded mode
-        if ( !( target.exists() && target.isDirectory() ) )
+        if ( !target.exists() )
         {
-            target = new File( "." );
+            target.mkdirs();
         }
         File pidFile = new File( target, fileName );
+        if ( pidFile.exists() )
+        {
+            pidFile.delete();
+        }
         FileWriter fw = new FileWriter( pidFile );
         // DGF little known trick... this is guaranteed to be unique to the PID
         // In fact, it usually contains the pid and the local host name!

-- 
To stop receiving notification emails like this one, please contact
tibordigana@apache.org.