diff --git a/smack-integration-test/src/main/java/org/igniterealtime/smack/XmppConnectionStressTest.java b/smack-integration-test/src/main/java/org/igniterealtime/smack/XmppConnectionStressTest.java index 8cabed30c..acb62b869 100644 --- a/smack-integration-test/src/main/java/org/igniterealtime/smack/XmppConnectionStressTest.java +++ b/smack-integration-test/src/main/java/org/igniterealtime/smack/XmppConnectionStressTest.java @@ -299,10 +299,32 @@ public class XmppConnectionStressTest { private ErrorsWhileSendingOrReceivingException(Map sendExceptions, Map receiveExceptions) { - super("Exceptions while sending and/or receiving"); + super(createMessageFrom(sendExceptions, receiveExceptions)); this.sendExceptions = sendExceptions; this.receiveExceptions = receiveExceptions; } + + private static String createMessageFrom(Map sendExceptions, + Map receiveExceptions) { + StringBuilder sb = new StringBuilder(1024); + sb.append("Exceptions while sending and/or receiving."); + + if (!sendExceptions.isEmpty()) { + sb.append(" Send exxceptions: "); + for (Map.Entry entry : sendExceptions.entrySet()) { + sb.append(entry.getKey()).append(": ").append(entry.getValue()).append(';'); + } + } + + if (!receiveExceptions.isEmpty()) { + sb.append(" Receive exceptions: "); + for (Map.Entry entry : receiveExceptions.entrySet()) { + sb.append(entry.getKey()).append(": ").append(entry.getValue()); + } + } + + return sb.toString(); + } } } }