From a4053e864580fa90c46d496f421441c3bd8db6c6 Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Mon, 26 Apr 2021 10:48:41 +0200 Subject: [PATCH] test: cleanup URISyntaxException exceptions Note: we cannot update the `IO.socket(uri: string)` method without doing a breaking change. --- .../java/io/socket/client/Connection.java | 16 ++-- .../java/io/socket/client/ConnectionTest.java | 78 +++++++++---------- .../io/socket/client/SSLConnectionTest.java | 5 +- .../socket/client/ServerConnectionTest.java | 27 +++---- .../java/io/socket/client/SocketTest.java | 21 +++-- 5 files changed, 71 insertions(+), 76 deletions(-) diff --git a/src/test/java/io/socket/client/Connection.java b/src/test/java/io/socket/client/Connection.java index 9e7bf8c..8b97bc2 100644 --- a/src/test/java/io/socket/client/Connection.java +++ b/src/test/java/io/socket/client/Connection.java @@ -6,7 +6,7 @@ import org.junit.Before; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; -import java.net.URISyntaxException; +import java.net.URI; import java.util.HashMap; import java.util.Map; import java.util.concurrent.*; @@ -77,24 +77,24 @@ public abstract class Connection { serverService.awaitTermination(3000, TimeUnit.MILLISECONDS); } - Socket client() throws URISyntaxException { + Socket client() { return client(createOptions()); } - Socket client(String path) throws URISyntaxException { + Socket client(String path) { return client(path, createOptions()); } - Socket client(IO.Options opts) throws URISyntaxException { + Socket client(IO.Options opts) { return client(nsp(), opts); } - Socket client(String path, IO.Options opts) throws URISyntaxException { - return IO.socket(uri() + path, opts); + Socket client(String path, IO.Options opts) { + return IO.socket(URI.create(uri() + path), opts); } - String uri() { - return "http://localhost:" + PORT; + URI uri() { + return URI.create("http://localhost:" + PORT); } String nsp() { diff --git a/src/test/java/io/socket/client/ConnectionTest.java b/src/test/java/io/socket/client/ConnectionTest.java index ee0c923..13ef7bf 100644 --- a/src/test/java/io/socket/client/ConnectionTest.java +++ b/src/test/java/io/socket/client/ConnectionTest.java @@ -29,7 +29,7 @@ public class ConnectionTest extends Connection { private Socket socket; @Test(timeout = TIMEOUT) - public void connectToLocalhost() throws URISyntaxException, InterruptedException { + public void connectToLocalhost() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { @@ -50,7 +50,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void startTwoConnectionsWithSamePath() throws URISyntaxException, InterruptedException { + public void startTwoConnectionsWithSamePath() throws InterruptedException { Socket s1 = client("/"); Socket s2 = client("/"); @@ -60,7 +60,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void startTwoConnectionsWithSamePathAndDifferentQuerystrings() throws URISyntaxException, InterruptedException { + public void startTwoConnectionsWithSamePathAndDifferentQuerystrings() throws InterruptedException { Socket s1 = client("/?woot"); Socket s2 = client("/"); @@ -70,7 +70,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void workWithAcks() throws URISyntaxException, InterruptedException { + public void workWithAcks() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { @@ -111,7 +111,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void receiveDateWithAck() throws URISyntaxException, InterruptedException { + public void receiveDateWithAck() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); @@ -136,7 +136,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void sendBinaryAck() throws URISyntaxException, InterruptedException { + public void sendBinaryAck() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); final byte[] buf = "huehue".getBytes(Charset.forName("UTF-8")); @@ -168,7 +168,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void receiveBinaryDataWithAck() throws URISyntaxException, InterruptedException { + public void receiveBinaryDataWithAck() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); final byte[] buf = "huehue".getBytes(Charset.forName("UTF-8")); @@ -191,7 +191,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void workWithFalse() throws URISyntaxException, InterruptedException { + public void workWithFalse() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { @@ -212,7 +212,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void receiveUTF8MultibyteCharacters() throws URISyntaxException, InterruptedException { + public void receiveUTF8MultibyteCharacters() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); final String[] correct = new String[] { "てすと", @@ -245,9 +245,9 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void connectToNamespaceAfterConnectionEstablished() throws URISyntaxException, InterruptedException { + public void connectToNamespaceAfterConnectionEstablished() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); - final Manager manager = new Manager(new URI(uri())); + final Manager manager = new Manager(uri()); socket = manager.socket("/"); socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { @Override @@ -270,9 +270,9 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void connectToNamespaceAfterConnectionGetsClosed() throws URISyntaxException, InterruptedException { + public void connectToNamespaceAfterConnectionGetsClosed() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); - final Manager manager = new Manager(new URI(uri())); + final Manager manager = new Manager(uri()); socket = manager.socket("/"); socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { @Override @@ -299,7 +299,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void reconnectByDefault() throws URISyntaxException, InterruptedException { + public void reconnectByDefault() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); socket.io().on(Manager.EVENT_RECONNECT, new Emitter.Listener() { @@ -320,7 +320,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void reconnectManually() throws URISyntaxException, InterruptedException { + public void reconnectManually() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); socket.once(Socket.EVENT_CONNECT, new Emitter.Listener() { @@ -346,7 +346,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void reconnectAutomaticallyAfterReconnectingManually() throws URISyntaxException, InterruptedException { + public void reconnectAutomaticallyAfterReconnectingManually() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); socket.once(Socket.EVENT_CONNECT, new Emitter.Listener() { @@ -378,14 +378,14 @@ public class ConnectionTest extends Connection { } @Test(timeout = 14000) - public void attemptReconnectsAfterAFailedReconnect() throws URISyntaxException, InterruptedException { + public void attemptReconnectsAfterAFailedReconnect() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); IO.Options opts = createOptions(); opts.reconnection = true; opts.timeout = 0; opts.reconnectionAttempts = 2; opts.reconnectionDelay = 10; - final Manager manager = new Manager(new URI(uri()), opts); + final Manager manager = new Manager(uri(), opts); socket = manager.socket("/timeout"); manager.once(Manager.EVENT_RECONNECT_FAILED, new Emitter.Listener() { @Override @@ -415,7 +415,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void reconnectDelayShouldIncreaseEveryTime() throws URISyntaxException, InterruptedException { + public void reconnectDelayShouldIncreaseEveryTime() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); IO.Options opts = createOptions(); opts.reconnection = true; @@ -423,7 +423,7 @@ public class ConnectionTest extends Connection { opts.reconnectionAttempts = 3; opts.reconnectionDelay = 100; opts.randomizationFactor = 0.2; - final Manager manager = new Manager(new URI(uri()), opts); + final Manager manager = new Manager(uri(), opts); socket = manager.socket("/timeout"); final int[] reconnects = new int[] {0}; @@ -524,7 +524,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void reconnectAfterStoppingReconnection() throws URISyntaxException, InterruptedException { + public void reconnectAfterStoppingReconnection() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); IO.Options opts = createOptions(); opts.forceNew = true; @@ -550,9 +550,9 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void stopReconnectingOnASocketAndKeepToReconnectOnAnother() throws URISyntaxException, InterruptedException { + public void stopReconnectingOnASocketAndKeepToReconnectOnAnother() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); - final Manager manager = new Manager(new URI(uri())); + final Manager manager = new Manager(uri()); final Socket socket1 = manager.socket("/"); final Socket socket2 = manager.socket("/asd"); @@ -596,10 +596,10 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void connectWhileDisconnectingAnotherSocket() throws URISyntaxException, InterruptedException { + public void connectWhileDisconnectingAnotherSocket() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); - final Manager manager = new Manager(new URI(uri())); + final Manager manager = new Manager(uri()); final Socket socket1 = manager.socket("/foo"); socket1.on(Socket.EVENT_CONNECT, new Emitter.Listener() { @Override @@ -623,13 +623,13 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void tryToReconnectTwiceAndFailWithIncorrectAddress() throws URISyntaxException, InterruptedException { + public void tryToReconnectTwiceAndFailWithIncorrectAddress() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); IO.Options opts = new IO.Options(); opts.reconnection = true; opts.reconnectionAttempts = 2; opts.reconnectionDelay = 10; - final Manager manager = new Manager(new URI("http://localhost:3940"), opts); + final Manager manager = new Manager(URI.create("http://localhost:3940"), opts); socket = manager.socket("/asd"); final int[] reconnects = new int[] {0}; Emitter.Listener cb = new Emitter.Listener() { @@ -655,14 +655,14 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void tryToReconnectTwiceAndFailWithImmediateTimeout() throws URISyntaxException, InterruptedException { + public void tryToReconnectTwiceAndFailWithImmediateTimeout() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); IO.Options opts = new IO.Options(); opts.reconnection = true; opts.timeout = 0; opts.reconnectionAttempts = 2; opts.reconnectionDelay = 10; - final Manager manager = new Manager(new URI(uri()), opts); + final Manager manager = new Manager(uri(), opts); final int[] reconnects = new int[] {0}; Emitter.Listener reconnectCb = new Emitter.Listener() { @@ -688,11 +688,11 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void notTryToReconnectWithIncorrectPortWhenReconnectionDisabled() throws URISyntaxException, InterruptedException { + public void notTryToReconnectWithIncorrectPortWhenReconnectionDisabled() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); IO.Options opts = new IO.Options(); opts.reconnection = false; - final Manager manager = new Manager(new URI("http://localhost:9823"), opts); + final Manager manager = new Manager(URI.create("http://localhost:9823"), opts); Emitter.Listener cb = new Emitter.Listener() { @Override public void call(Object... objects) { @@ -722,7 +722,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void fireReconnectEventsOnSocket() throws URISyntaxException, InterruptedException { + public void fireReconnectEventsOnSocket() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); Manager.Options opts = new Manager.Options(); @@ -730,7 +730,7 @@ public class ConnectionTest extends Connection { opts.timeout = 0; opts.reconnectionAttempts = 2; opts.reconnectionDelay = 10; - final Manager manager = new Manager(new URI(uri()), opts); + final Manager manager = new Manager(uri(), opts); socket = manager.socket("/timeout_socket"); final int[] reconnects = new int[] {0}; @@ -757,7 +757,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void fireReconnectingWithAttemptsNumberWhenReconnectingTwice() throws URISyntaxException, InterruptedException { + public void fireReconnectingWithAttemptsNumberWhenReconnectingTwice() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); Manager.Options opts = new Manager.Options(); @@ -765,7 +765,7 @@ public class ConnectionTest extends Connection { opts.timeout = 0; opts.reconnectionAttempts = 2; opts.reconnectionDelay = 10; - final Manager manager = new Manager(new URI(uri()), opts); + final Manager manager = new Manager(uri(), opts); socket = manager.socket("/timeout_socket"); final int[] reconnects = new int[] {0}; @@ -792,7 +792,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void emitDateAsString() throws URISyntaxException, InterruptedException { + public void emitDateAsString() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { @@ -813,7 +813,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void emitDateInObject() throws URISyntaxException, InterruptedException, JSONException { + public void emitDateInObject() throws InterruptedException, JSONException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { @@ -843,7 +843,7 @@ public class ConnectionTest extends Connection { @Test(timeout = TIMEOUT) - public void sendAndGetBinaryData() throws URISyntaxException, InterruptedException { + public void sendAndGetBinaryData() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); final byte[] buf = "asdfasdf".getBytes(Charset.forName("UTF-8")); socket = client(); @@ -865,7 +865,7 @@ public class ConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void sendBinaryDataMixedWithJson() throws URISyntaxException, InterruptedException, JSONException { + public void sendBinaryDataMixedWithJson() throws InterruptedException, JSONException { final BlockingQueue values = new LinkedBlockingQueue(); final byte[] buf = "howdy".getBytes(Charset.forName("UTF-8")); socket = client(); diff --git a/src/test/java/io/socket/client/SSLConnectionTest.java b/src/test/java/io/socket/client/SSLConnectionTest.java index 26ad1b1..2661f0c 100644 --- a/src/test/java/io/socket/client/SSLConnectionTest.java +++ b/src/test/java/io/socket/client/SSLConnectionTest.java @@ -16,6 +16,7 @@ import javax.net.ssl.X509TrustManager; import java.io.File; import java.io.FileInputStream; import java.io.IOException; +import java.net.URI; import java.security.GeneralSecurityException; import java.security.KeyStore; import java.util.concurrent.BlockingQueue; @@ -39,8 +40,8 @@ public class SSLConnectionTest extends Connection { } @Override - String uri() { - return "https://localhost:" + PORT; + URI uri() { + return URI.create("https://localhost:" + PORT); } @Override diff --git a/src/test/java/io/socket/client/ServerConnectionTest.java b/src/test/java/io/socket/client/ServerConnectionTest.java index 6c421a1..9360b15 100644 --- a/src/test/java/io/socket/client/ServerConnectionTest.java +++ b/src/test/java/io/socket/client/ServerConnectionTest.java @@ -9,7 +9,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import java.net.URISyntaxException; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -26,7 +25,7 @@ public class ServerConnectionTest extends Connection { private Socket socket2; @Test(timeout = TIMEOUT) - public void openAndClose() throws URISyntaxException, InterruptedException { + public void openAndClose() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); @@ -51,7 +50,7 @@ public class ServerConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void message() throws URISyntaxException, InterruptedException { + public void message() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); @@ -131,7 +130,7 @@ public class ServerConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void ackWithoutArgs() throws URISyntaxException, InterruptedException { + public void ackWithoutArgs() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); @@ -153,7 +152,7 @@ public class ServerConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void ackWithoutArgsFromClient() throws URISyntaxException, InterruptedException { + public void ackWithoutArgsFromClient() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); @@ -188,7 +187,7 @@ public class ServerConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void closeEngineConnection() throws URISyntaxException, InterruptedException { + public void closeEngineConnection() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); @@ -209,18 +208,14 @@ public class ServerConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void broadcast() throws URISyntaxException, InterruptedException { + public void broadcast() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { @Override public void call(Object... objects) { - try { - socket2 = client(); - } catch (URISyntaxException e) { - throw new RuntimeException(e); - } + socket2 = client(); socket2.on(Socket.EVENT_CONNECT, new Emitter.Listener() { @Override @@ -246,7 +241,7 @@ public class ServerConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void room() throws URISyntaxException, InterruptedException { + public void room() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); @@ -270,7 +265,7 @@ public class ServerConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void pollingHeaders() throws URISyntaxException, InterruptedException { + public void pollingHeaders() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); IO.Options opts = createOptions(); @@ -305,7 +300,7 @@ public class ServerConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void websocketHandshakeHeaders() throws URISyntaxException, InterruptedException { + public void websocketHandshakeHeaders() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); IO.Options opts = createOptions(); @@ -340,7 +335,7 @@ public class ServerConnectionTest extends Connection { } @Test(timeout = TIMEOUT) - public void disconnectFromServer() throws URISyntaxException, InterruptedException { + public void disconnectFromServer() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); diff --git a/src/test/java/io/socket/client/SocketTest.java b/src/test/java/io/socket/client/SocketTest.java index 5851ff7..f710f5e 100644 --- a/src/test/java/io/socket/client/SocketTest.java +++ b/src/test/java/io/socket/client/SocketTest.java @@ -8,7 +8,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import java.net.URISyntaxException; import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.BlockingQueue; @@ -26,7 +25,7 @@ public class SocketTest extends Connection { private Socket socket; @Test(timeout = TIMEOUT) - public void shouldHaveAnAccessibleSocketIdEqualToServerSideSocketId() throws URISyntaxException, InterruptedException { + public void shouldHaveAnAccessibleSocketIdEqualToServerSideSocketId() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { @@ -45,7 +44,7 @@ public class SocketTest extends Connection { } @Test(timeout = TIMEOUT) - public void shouldHaveAnAccessibleSocketIdEqualToServerSideSocketIdOnCustomNamespace() throws URISyntaxException, InterruptedException { + public void shouldHaveAnAccessibleSocketIdEqualToServerSideSocketIdOnCustomNamespace() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client("/foo"); socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { @@ -64,7 +63,7 @@ public class SocketTest extends Connection { } @Test(timeout = TIMEOUT) - public void clearsSocketIdUponDisconnection() throws URISyntaxException, InterruptedException { + public void clearsSocketIdUponDisconnection() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() { @@ -87,7 +86,7 @@ public class SocketTest extends Connection { } @Test(timeout = TIMEOUT) - public void doesNotFireConnectErrorIfWeForceDisconnectInOpeningState() throws URISyntaxException, InterruptedException { + public void doesNotFireConnectErrorIfWeForceDisconnectInOpeningState() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); IO.Options opts = new IO.Options(); opts.timeout = 100; @@ -114,7 +113,7 @@ public class SocketTest extends Connection { } @Test(timeout = TIMEOUT) - public void shouldChangeSocketIdUponReconnection() throws URISyntaxException, InterruptedException { + public void shouldChangeSocketIdUponReconnection() throws InterruptedException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client(); socket.once(Socket.EVENT_CONNECT, new Emitter.Listener() { @@ -155,7 +154,7 @@ public class SocketTest extends Connection { } @Test(timeout = TIMEOUT) - public void shouldAcceptAQueryStringOnDefaultNamespace() throws URISyntaxException, InterruptedException, JSONException { + public void shouldAcceptAQueryStringOnDefaultNamespace() throws InterruptedException, JSONException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client("/?c=d"); @@ -176,7 +175,7 @@ public class SocketTest extends Connection { } @Test(timeout = TIMEOUT) - public void shouldAcceptAQueryString() throws URISyntaxException, InterruptedException, JSONException { + public void shouldAcceptAQueryString() throws InterruptedException, JSONException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client("/abc?b=c&d=e"); @@ -199,7 +198,7 @@ public class SocketTest extends Connection { } @Test(timeout = TIMEOUT) - public void shouldAcceptAnAuthOption() throws URISyntaxException, InterruptedException, JSONException { + public void shouldAcceptAnAuthOption() throws InterruptedException, JSONException { final BlockingQueue values = new LinkedBlockingQueue(); IO.Options opts = new IO.Options(); @@ -223,7 +222,7 @@ public class SocketTest extends Connection { } @Test(timeout = TIMEOUT) - public void shouldFireAnErrorEventOnMiddlewareFailure() throws URISyntaxException, InterruptedException, JSONException { + public void shouldFireAnErrorEventOnMiddlewareFailure() throws InterruptedException, JSONException { final BlockingQueue values = new LinkedBlockingQueue(); socket = client("/no"); @@ -245,7 +244,7 @@ public class SocketTest extends Connection { } @Test(timeout = TIMEOUT) - public void shouldThrowOnReservedEvent() throws URISyntaxException, InterruptedException, JSONException { + public void shouldThrowOnReservedEvent() { final BlockingQueue values = new LinkedBlockingQueue(); socket = client("/no");