This is an automated email from the ASF dual-hosted git repository. aldettinger pushed a commit to branch CAMEL-13826 in repository https://gitbox.apache.org/repos/asf/camel.git
commit 55b43c1502ce8ee573835c0efeae20e4d999666f Author: aldettinger <aldettin...@gmail.com> AuthorDate: Mon Aug 19 16:41:46 2019 +0200 Merging CAMEL-13826 branch with master --- .../test/java/org/apache/camel/test/AvailablePortFinderTest.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/components/camel-test-junit5/src/test/java/org/apache/camel/test/AvailablePortFinderTest.java b/components/camel-test-junit5/src/test/java/org/apache/camel/test/AvailablePortFinderTest.java index 3b96852..c331037 100644 --- a/components/camel-test-junit5/src/test/java/org/apache/camel/test/AvailablePortFinderTest.java +++ b/components/camel-test-junit5/src/test/java/org/apache/camel/test/AvailablePortFinderTest.java @@ -24,14 +24,12 @@ import java.net.ServerSocket; import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertThrows; public class AvailablePortFinderTest { @Test - public void testNotAvailableTcpPort() { + public void testNotAvailableTcpPort() throws Exception { int p1 = AvailablePortFinder.getNextAvailable(); ServerSocket socket = new ServerSocket(p1); int p2 = AvailablePortFinder.getNextAvailable(); @@ -40,7 +38,7 @@ public class AvailablePortFinderTest { } @Test - public void testNotAvailableUdpPort() { + public void testNotAvailableUdpPort() throws Exception { int p1 = AvailablePortFinder.getNextAvailable(); DatagramSocket socket = new DatagramSocket(p1); int p2 = AvailablePortFinder.getNextAvailable(); @@ -49,7 +47,7 @@ public class AvailablePortFinderTest { } @Test - public void testNotAvailableMulticastPort() { + public void testNotAvailableMulticastPort() throws Exception { int p1 = AvailablePortFinder.getNextAvailable(); MulticastSocket socket = new MulticastSocket(null); socket.setReuseAddress(false); // true is default for MulticastSocket, we wan to fail if port is occupied