diff --git a/test/net/azib/ipscan/core/net/ICMPSharedPingerTest.java b/test/net/azib/ipscan/core/net/ICMPSharedPingerTest.java index ce9c85b7..3ad1ef7c 100644 --- a/test/net/azib/ipscan/core/net/ICMPSharedPingerTest.java +++ b/test/net/azib/ipscan/core/net/ICMPSharedPingerTest.java @@ -8,13 +8,7 @@ import java.net.InetAddress; import static org.junit.Assert.assertTrue; -/** - * SharedPingerTest - * - * @author Anton Keks - */ public class ICMPSharedPingerTest { - @Test @Ignore("this test works only under root") public void testPing() throws Exception { Pinger pinger = new ICMPSharedPinger(1000); @@ -23,5 +17,4 @@ public class ICMPSharedPingerTest { assertTrue(result.getAverageTime() < 50); assertTrue(result.getTTL() >= 0); } - } diff --git a/test/net/azib/ipscan/core/net/UDPPingerTest.java b/test/net/azib/ipscan/core/net/UDPPingerTest.java index 45902820..f1728983 100644 --- a/test/net/azib/ipscan/core/net/UDPPingerTest.java +++ b/test/net/azib/ipscan/core/net/UDPPingerTest.java @@ -1,7 +1,20 @@ package net.azib.ipscan.core.net; +import net.azib.ipscan.config.Platform; +import org.junit.Test; + +import java.io.IOException; + +import static org.junit.Assume.assumeFalse; + public class UDPPingerTest extends AbstractPingerTest { public UDPPingerTest() { super(new UDPPinger(10)); } + + @Test @Override + public void pingAlive() throws IOException { + assumeFalse(Platform.MAC_OS); + super.pingAlive(); + } }