Fixed by https://github.com/netty/netty/pull/4931

Print the full thread dump on test timeout
Otherwise it is sometimes difficult to analyze the test timeout reported by our CI server - e.g. #3138 

We could write a JUnit `RunListener` that prints the full thread dump when the test fails with timeout, and also do some additional operations like triggering GC when running a leak test.

The Maven surefire plugin allows us to specify the listener in the pom:

```
          <properties>
            <property>
              <name>listener</name>
              <value>...NettyRunListener</value>
            </property>
          </properties>
```

pom.xml
pom.xml
diff --git a/pom.xml b/pom.xml
index 0697eeb437a..8264f7f8d44 100644
--- a/pom.xml
+++ b/pom.xml
@@ -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>
@@ -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>
@@ -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>
@@ -714,7 +726,7 @@
           <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>netty-build</artifactId>
-            <version>21</version>
+            <version>${netty.build.version}</version>
           </dependency>
         </dependencies>
       </plugin>
@@ -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 -->
