Removed TestUtil.timingTestEnabled because it's not used in the CI servers

This commit is contained in:
Trustin Lee 2010-01-26 03:02:34 +00:00
parent eeb4e8f7b1
commit d87d81e398
3 changed files with 0 additions and 25 deletions

View File

@ -41,10 +41,6 @@ public class NioClientSocketShutdownTimeTest {
@Test @Test
public void testShutdownTime() throws Throwable { public void testShutdownTime() throws Throwable {
if (!TestUtil.isTimingTestEnabled()) {
return;
}
ServerSocketChannel serverSocket = ServerSocketChannel.open(); ServerSocketChannel serverSocket = ServerSocketChannel.open();
serverSocket.socket().bind(new InetSocketAddress(0)); serverSocket.socket().bind(new InetSocketAddress(0));

View File

@ -44,10 +44,6 @@ public class NioServerSocketShutdownTimeTest {
@Test(timeout = 10000) @Test(timeout = 10000)
public void testSuccessfulBindAttempt() throws Exception { public void testSuccessfulBindAttempt() throws Exception {
if (!TestUtil.isTimingTestEnabled()) {
return;
}
ServerBootstrap bootstrap = new ServerBootstrap( ServerBootstrap bootstrap = new ServerBootstrap(
new NioServerSocketChannelFactory( new NioServerSocketChannelFactory(
Executors.newCachedThreadPool(), Executors.newCachedThreadPool(),

View File

@ -18,8 +18,6 @@ package org.jboss.netty.util;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import org.jboss.netty.util.internal.ConversionUtil;
/** /**
* @author The Netty Project (netty-dev@lists.jboss.org) * @author The Netty Project (netty-dev@lists.jboss.org)
@ -29,20 +27,9 @@ import org.jboss.netty.util.internal.ConversionUtil;
@org.junit.Ignore @org.junit.Ignore
public final class TestUtil { public final class TestUtil {
private static final boolean ENABLED;
private static final InetAddress LOCALHOST; private static final InetAddress LOCALHOST;
static { static {
String value = System.getProperty("exclude-timing-tests", "false").trim();
if (value.length() == 0) {
value = "true";
}
ENABLED = !ConversionUtil.toBoolean(value);
if (!ENABLED) {
System.err.println("Timing tests will be disabled as requested.");
}
InetAddress localhost = null; InetAddress localhost = null;
try { try {
localhost = InetAddress.getLocalHost(); localhost = InetAddress.getLocalHost();
@ -62,10 +49,6 @@ public final class TestUtil {
LOCALHOST = localhost; LOCALHOST = localhost;
} }
public static boolean isTimingTestEnabled() {
return ENABLED;
}
public static InetAddress getLocalHost() { public static InetAddress getLocalHost() {
// We cache this because some machine takes almost forever to return // We cache this because some machine takes almost forever to return
// from InetAddress.getLocalHost(). I think it's due to the incorrect // from InetAddress.getLocalHost(). I think it's due to the incorrect