1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-26 00:02:06 +01:00

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

View file

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