[improve][test] Print stacktrace when the test fails
@@ -45,11 +45,14 @@ public class PulsarTestListener implements ITestListener {
System.out.format("!!!!!!!!! FAILURE-- %s.%s(%s)-------\n", result.getTestClass(),
result.getMethod().getMethodName(), Arrays.toString(result.getParameters()));
}
+ if (result.getThrowable() != null) {
+ result.getThrowable().printStackTrace();
if (result.getThrowable() instanceof ThreadTimeoutException) {
System.out.println("====== THREAD DUMPS ======");
System.out.println(ThreadDumpUtil.buildThreadDiagnosticString());
}
}
+ }
@Override
public void onTestSkipped(ITestResult result) {
