diff --git a/proxy/src/test/java/net/md_5/bungee/ThrottleTest.java b/proxy/src/test/java/net/md_5/bungee/ThrottleTest.java index 931fdb8a..e16a0878 100644 --- a/proxy/src/test/java/net/md_5/bungee/ThrottleTest.java +++ b/proxy/src/test/java/net/md_5/bungee/ThrottleTest.java @@ -12,7 +12,13 @@ public class ThrottleTest public void testThrottle() throws InterruptedException, UnknownHostException { ConnectionThrottle throttle = new ConnectionThrottle( 5 ); - InetAddress address = InetAddress.getLocalHost(); + InetAddress address; + + try { + address = InetAddress.getLocalHost(); + } catch (UnknownHostException ex) { + address = InetAddress.getByName( null ); + } Assert.assertFalse( "Address should not be throttled", throttle.throttle( address ) ); Assert.assertTrue( "Address should be throttled", throttle.throttle( address ) );