public class TestConnection extends Object
Connection
.Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static byte[] |
FAM_NAM |
private static org.slf4j.Logger |
LOG |
org.junit.rules.TestName |
name |
private static byte[] |
ROW |
private static int |
RPC_RETRY |
private static HBaseTestingUtil |
TEST_UTIL |
Constructor and Description |
---|
TestConnection() |
Modifier and Type | Method and Description |
---|---|
static void |
setUpBeforeClass() |
void |
tearDown() |
static void |
tearDownAfterClass() |
void |
testAdminFactory()
Naive test to check that Connection#getAdmin returns a properly constructed HBaseAdmin object
|
void |
testCancelConnectionMemoryLeak() |
void |
testClosedConnection() |
void |
testClosing() |
private void |
testConnectionClose(boolean allowsInterrupt) |
void |
testConnectionCloseAllowsInterrupt()
Test that we can handle connection close: it will trigger a retry, but the calls will finish.
|
void |
testConnectionIdle()
Test that connection can become idle without breaking everything.
|
void |
testConnectionNotAllowsInterrupt() |
void |
testCreateConnection()
Trivial test to verify that nobody messes with
ConnectionFactory.createConnection(Configuration) |
void |
testLocateRegionsWithRegionReplicas() |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtil TEST_UTIL
private static final byte[] FAM_NAM
private static final byte[] ROW
private static final int RPC_RETRY
public org.junit.rules.TestName name
public TestConnection()
public static void setUpBeforeClass() throws Exception
Exception
public static void tearDownAfterClass() throws Exception
Exception
public void tearDown() throws IOException
IOException
public void testAdminFactory() throws IOException
IOException
- Unable to construct adminpublic void testConnectionCloseAllowsInterrupt() throws Exception
Exception
public void testConnectionNotAllowsInterrupt() throws Exception
Exception
private void testConnectionClose(boolean allowsInterrupt) throws Exception
Exception
public void testConnectionIdle() throws Exception
Exception
public void testClosing() throws Exception
Exception
public void testCreateConnection() throws Exception
ConnectionFactory.createConnection(Configuration)
Exception
public void testLocateRegionsWithRegionReplicas() throws IOException
IOException
public void testClosedConnection() throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException, Throwable
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
Throwable
public void testCancelConnectionMemoryLeak() throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.