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 2020/01/12 20:31:26 UTC
[maven-surefire] branch maven2surefire-jvm-communication updated:
fixed few tests after bad merge
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch maven2surefire-jvm-communication
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/maven2surefire-jvm-communication by this push:
new f62bfe2 fixed few tests after bad merge
f62bfe2 is described below
commit f62bfe27ca8d8950409e86a409de9d5151a971dc
Author: tibordigana <ti...@apache.org>
AuthorDate: Sun Jan 12 21:31:18 2020 +0100
fixed few tests after bad merge
---
pom.xml | 1 -
.../maven/surefire/util/internal/DaemonThreadFactory.java | 9 +++++++++
surefire-booter/pom.xml | 14 --------------
3 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/pom.xml b/pom.xml
index ba748fb..fc98581 100644
--- a/pom.xml
+++ b/pom.xml
@@ -494,7 +494,6 @@
<compilerArgs>
<arg>-Xdoclint:all</arg>
</compilerArgs>
- <verbose>true</verbose>
</configuration>
</execution>
</executions>
diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/util/internal/DaemonThreadFactory.java b/surefire-api/src/main/java/org/apache/maven/surefire/util/internal/DaemonThreadFactory.java
index 06ddc53..32b597a 100644
--- a/surefire-api/src/main/java/org/apache/maven/surefire/util/internal/DaemonThreadFactory.java
+++ b/surefire-api/src/main/java/org/apache/maven/surefire/util/internal/DaemonThreadFactory.java
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.util.internal;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* Creates new daemon Thread.
@@ -30,14 +31,22 @@ public final class DaemonThreadFactory
{
private static final ThreadFactory DEFAULT_THREAD_FACTORY = Executors.defaultThreadFactory();
+ private static final AtomicInteger POOL_NUMBER = new AtomicInteger( 1 );
+
+ private final AtomicInteger threadNumber = new AtomicInteger( 1 );
+
+ private final String namePrefix;
+
private DaemonThreadFactory()
{
+ namePrefix = "pool-" + POOL_NUMBER.getAndIncrement() + "-thread-";
}
@Override
public Thread newThread( Runnable r )
{
Thread t = DEFAULT_THREAD_FACTORY.newThread( r );
+ t.setName( namePrefix + threadNumber.getAndIncrement() );
t.setDaemon( true );
return t;
}
diff --git a/surefire-booter/pom.xml b/surefire-booter/pom.xml
index 6ba9af1..a0dbd9a 100644
--- a/surefire-booter/pom.xml
+++ b/surefire-booter/pom.xml
@@ -36,12 +36,6 @@
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-api</artifactId>
<version>${project.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.maven.shared</groupId>
- <artifactId>maven-shared-utils</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
@@ -54,14 +48,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<scope>provided</scope>