maven-surefire git commit: [SUREFIRE-1435] Improve Thread Dump. Use prefix "surefire-forkedjvm" in daemon Threads in forked JVM

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

maven-surefire git commit: [SUREFIRE-1435] Improve Thread Dump. Use prefix "surefire-forkedjvm" in daemon Threads in forked JVM

Tibor Digana
Repository: maven-surefire
Updated Branches:
  refs/heads/master cb3f66add -> 198ef48af


[SUREFIRE-1435] Improve Thread Dump. Use prefix "surefire-forkedjvm" in daemon Threads in forked JVM


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/198ef48a
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/198ef48a
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/198ef48a

Branch: refs/heads/master
Commit: 198ef48af094e3de7f132e03da9b70d0da5b246e
Parents: cb3f66a
Author: Tibor17 <[hidden email]>
Authored: Sun Oct 8 22:23:51 2017 +0200
Committer: Tibor17 <[hidden email]>
Committed: Sun Oct 8 22:23:51 2017 +0200

----------------------------------------------------------------------
 .../java/org/apache/maven/surefire/booter/ForkedBooter.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/198ef48a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java
----------------------------------------------------------------------
diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java
index d00abc5..33662d1 100644
--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java
+++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java
@@ -70,6 +70,8 @@ public final class ForkedBooter
     private static final long DEFAULT_SYSTEM_EXIT_TIMEOUT_IN_SECONDS = 30L;
     private static final long PING_TIMEOUT_IN_SECONDS = 30L;
     private static final long ONE_SECOND_IN_MILLIS = 1000L;
+    private static final String LAST_DITCH_SHUTDOWN_THREAD = "surefire-forkedjvm-last-ditch-daemon-shutdown-thread-";
+    private static final String PING_THREAD = "surefire-forkedjvm-ping-";
 
     private final CommandReader commandReader = CommandReader.getReader();
     private final PrintStream originalOut = System.out;
@@ -345,7 +347,7 @@ public final class ForkedBooter
         if ( jvmTerminator == null )
         {
             ThreadFactory threadFactory =
-                    newDaemonThreadFactory( "last-ditch-daemon-shutdown-thread-" + systemExitTimeoutInSeconds + "s" );
+                    newDaemonThreadFactory( LAST_DITCH_SHUTDOWN_THREAD + systemExitTimeoutInSeconds + "s" );
             jvmTerminator = new ScheduledThreadPoolExecutor( 1, threadFactory );
             jvmTerminator.setMaximumPoolSize( 1 );
         }
@@ -434,7 +436,7 @@ public final class ForkedBooter
 
     private static ScheduledExecutorService createPingScheduler()
     {
-        ThreadFactory threadFactory = newDaemonThreadFactory( "ping-" + PING_TIMEOUT_IN_SECONDS + "s" );
+        ThreadFactory threadFactory = newDaemonThreadFactory( PING_THREAD + PING_TIMEOUT_IN_SECONDS + "s" );
         ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor( 1, threadFactory );
         executor.setKeepAliveTime( 3L, SECONDS );
         executor.setMaximumPoolSize( 2 );