Improve junit test in Socks5ByteStreamManager

It could be that the test is flapping. This helps to see the origin of
the unexpected exception.
This commit is contained in:
Florian Schmaus 2019-06-10 17:36:20 +02:00
parent 4d36e3b521
commit 1f8b7273a8
1 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@ import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smack.packet.ErrorIQ;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.StanzaError;
import org.jivesoftware.smack.util.ExceptionUtil;
import org.jivesoftware.smack.util.NetworkUtil;
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream;
@ -602,7 +603,7 @@ public class Socks5ByteStreamManagerTest {
// initiator can't connect to proxy because it is not running
protocol.verifyAll();
Throwable actualCause = e.getCause().getCause();
assertEquals(ConnectException.class, actualCause.getClass());
assertEquals("Unexpected throwable: " + actualCause + '.' + ExceptionUtil.getStackTrace(actualCause), ConnectException.class, actualCause.getClass());
}
/**