forked from I2P_Developers/i2p.i2p
Test SOCKS4 client: no response to connect
This commit is contained in:
@@ -74,6 +74,20 @@ public class SOCKS4ClientTest {
|
||||
assertArrayEquals(expectedByteStream.toByteArray(), ops.toByteArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* Run into IOException while trying to connect due to no input/response
|
||||
*/
|
||||
@Test
|
||||
public void connect__ioException() {
|
||||
assertThrows(IOException.class, () -> {
|
||||
SOCKS4Client.connect(
|
||||
new ByteArrayInputStream(new byte[]{}),
|
||||
new ByteArrayOutputStream(),
|
||||
"127.0.0.1",
|
||||
80);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* IPv6 is not supported by this SOCKS client so it just throws an exception
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user