testng: mark test as success but print corresponding throwable if test fail within accepted percentage (IDEA-140261)

This commit is contained in:
Anna Kozlova
2015-05-13 22:02:00 +02:00
parent 234e3b6763
commit 4e2e4edba0
@@ -79,7 +79,13 @@ public class IDEATestNGRemoteListener implements ISuiteListener, IResultListener
myPrintStream.println("\n##teamcity[testIgnored name=\'" + escapeName(getTestMethodNameWithParams(result)) + "\']");
}
public synchronized void onTestFailedButWithinSuccessPercentage(ITestResult result) {}
public synchronized void onTestFailedButWithinSuccessPercentage(ITestResult result) {
final Throwable throwable = result.getThrowable();
if (throwable != null) {
throwable.printStackTrace();
}
onTestSuccess(result);
}
public synchronized void onStart(ITestContext context) {}