Hi, you can create a simple Listener like this one: https://github.com/apache/bookkeeper/blob/master/bookkeeper-common/src/test/java/org/apache/bookkeeper/common/testing/util/TimedOutTestsListener.java
check on the pom.xml file about how to enable it: https://github.com/apache/bookkeeper/blob/2f996dcf0159f945f7ec97ce7402e5d293009444/bookkeeper-server/pom.xml#L212 hope that helps Enrico Il giorno gio 3 ott 2019 alle ore 14:49 Debraj Manna < subharaj.ma...@gmail.com> ha scritto: > Sometimes I have maven surefire tests that get hung, due to either races or > deadlocks. > > When this happens I have to discover what slave is being used, and then I > have to log on that slave, sudo to jenkins account and execute either > jstack or kill -3 > > I am looking for a simple solution like doing jstack / kill -3 when someone > presses abort button on the jenkins. > > Can someone suggest how can I automate this or some better way of handling > this? >