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/10/09 09:28:34 UTC
[maven-surefire] branch gh-build-fix updated (5d145fb -> 679d31d)
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a change to branch gh-build-fix
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git.
discard 5d145fb [GH] investigate
new 679d31d [GH] investigate
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (5d145fb)
\
N -- N -- N refs/heads/gh-build-fix (679d31d)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[maven-surefire] 01/01: [GH] investigate
Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch gh-build-fix
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
commit 679d31de5291e690736d10f9b5f2668e73fd0f80
Author: tibordigana <ti...@apache.org>
AuthorDate: Fri Oct 9 11:13:30 2020 +0200
[GH] investigate
---
.../surefire/extensions/EventConsumerThread.java | 1 +
.../org/apache/maven/surefire/JUnit4SuiteTest.java | 31 ++++++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/EventConsumerThread.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/EventConsumerThread.java
index 8b855d8..4f1ea09 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/EventConsumerThread.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/EventConsumerThread.java
@@ -262,6 +262,7 @@ public class EventConsumerThread extends CloseableDaemonThread
}
catch ( RuntimeException e )
{
+ e.printStackTrace();
arguments.dumpStreamException( e );
}
catch ( IOException e )
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java b/maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
index 7692a04..73dfceb 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
@@ -64,6 +64,12 @@ import org.apache.maven.surefire.report.RunStatisticsTest;
import org.apache.maven.surefire.spi.SPITest;
import org.apache.maven.surefire.util.RelocatorTest;
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadInfo;
+import java.lang.management.ThreadMXBean;
+import java.util.concurrent.Callable;
+import java.util.concurrent.FutureTask;
+
/**
* Adapt the JUnit4 tests which use only annotations to the JUnit3 test suite.
*
@@ -74,6 +80,7 @@ public class JUnit4SuiteTest extends TestCase
{
public static Test suite()
{
+ threadDump();
TestSuite suite = new TestSuite();
suite.addTestSuite( RelocatorTest.class );
suite.addTestSuite( RunStatisticsTest.class );
@@ -118,4 +125,28 @@ public class JUnit4SuiteTest extends TestCase
suite.addTest( new JUnit4TestAdapter( EventConsumerThreadTest.class ) );
return suite;
}
+
+ @SuppressWarnings( "checkstyle:magicnumber" )
+ private static void threadDump()
+ {
+ Thread t = new Thread( new FutureTask<>( new Callable<Void>()
+ {
+ @Override
+ public Void call() throws Exception
+ {
+ Thread.sleep( 1000L );
+ StringBuilder threadDump = new StringBuilder( "### THIS IS THREAD DUMP BEG ###" );
+ ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
+ for ( ThreadInfo threadInfo : threadMXBean.dumpAllThreads( true, true ) )
+ {
+ threadDump.append( System.lineSeparator() ).append( threadInfo.toString() );
+ }
+ threadDump.append( System.lineSeparator() ).append( "### THIS IS THREAD DUMP END ###" );
+ System.out.println( threadDump );
+ return null;
+ }
+ } ) );
+ t.setDaemon( true );
+ t.start();
+ }
}