HBASE-15263 TestIPv6NIOServerSocketChannel.testServerSocketFromLocalhostResolution can hang indefinetly

Signed-off-by: stack <stack@apache.org>
This commit is contained in:
chenheng 2016-02-16 15:29:40 +08:00 committed by stack
parent 7063562bf1
commit e3aa71fb76

View File

@ -30,8 +30,10 @@ import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hbase.testclassification.MiscTests;
import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestRule;
/**
* This tests whether ServerSocketChannel works over ipv6, which Zookeeper
@ -49,6 +51,9 @@ public class TestIPv6NIOServerSocketChannel {
private static final Log LOG = LogFactory.getLog(TestIPv6NIOServerSocketChannel.class);
@Rule
public final TestRule timeout = CategoryBasedTimeout.builder().
withTimeout(this.getClass()).withLookingForStuckThread(true).build();
/**
* Creates and binds a regular ServerSocket.
*/