Commit 3c1f39d0 authored by Anna.Kozlova's avatar Anna.Kozlova
Browse files

testng: extract data from junit exceptions if applicable (IDEA-195047)

parent 8d9c9ebf
Showing with 10 additions and 1 deletion
+10 -1
...@@ -225,11 +225,20 @@ public class IDEATestNGRemoteListener { ...@@ -225,11 +225,20 @@ public class IDEATestNGRemoteListener {
if (ex != null) { if (ex != null) {
ComparisonFailureData notification; ComparisonFailureData notification;
try { try {
notification = TestNGExpectedPatterns.createExceptionNotification(failureMessage); notification = ComparisonFailureData.create(ex);
} }
catch (Throwable e) { catch (Throwable e) {
notification = null; notification = null;
} }
if (notification == null) {
try {
notification = TestNGExpectedPatterns.createExceptionNotification(failureMessage);
}
catch (Throwable e) {
notification = null;
}
}
ComparisonFailureData.registerSMAttributes(notification, getTrace(ex), failureMessage, attrs, ex); ComparisonFailureData.registerSMAttributes(notification, getTrace(ex), failureMessage, attrs, ex);
} }
else { else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment