Skip to content

Commit

Permalink
Add junit timeout listener to print the full thread dump on test timeout
Browse files Browse the repository at this point in the history
Motivation:

See #3172

Modifications:

netty/netty-build#6 added a junit timeout listener to the netty-build project. This patch just set it up.

Result:

If a test is set the timeout parameter using junit's @test(timeout = ...) and the timeout is triggered, a full stack trace dump will be outputted and also output the deadlocks if any.
  • Loading branch information
windie authored and normanmaurer committed Mar 4, 2016
1 parent 68bbd4e commit c295f22
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<netty.build.version>22</netty.build.version>
<jboss.marshalling.version>1.3.18.GA</jboss.marshalling.version>
<jetty.alpnAgent.version>1.0.1.Final</jetty.alpnAgent.version>
<jetty.alpnAgent.path>${settings.localRepository}/kr/motd/javaagent/jetty-alpn-agent/${jetty.alpnAgent.version}/jetty-alpn-agent-${jetty.alpnAgent.version}.jar</jetty.alpnAgent.path>
Expand Down Expand Up @@ -420,6 +421,12 @@
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-build</artifactId>
<version>${netty.build.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
Expand Down Expand Up @@ -532,6 +539,11 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-build</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
Expand Down Expand Up @@ -714,7 +726,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-build</artifactId>
<version>21</version>
<version>${netty.build.version}</version>
</dependency>
</dependencies>
</plugin>
Expand Down Expand Up @@ -774,6 +786,12 @@
</excludes>
<runOrder>random</runOrder>
<argLine>${argLine.common} ${argLine.alpnAgent} ${argLine.leak} ${argLine.coverage} ${argLine.noUnsafe}</argLine>
<properties>
<property>
<name>listener</name>
<value>io.netty.build.junit.TimedOutTestsListener</value>
</property>
</properties>
</configuration>
</plugin>
<!-- always produce osgi bundles -->
Expand Down

0 comments on commit c295f22

Please sign in to comment.