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 29ce46a67f
commit 6ed63180e1
1 changed files with 5 additions and 0 deletions

View File

@ -29,8 +29,10 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
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
@ -48,6 +50,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.
*/