|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.bookkeeper.util.ClientBase
public abstract class ClientBase
Base class for tests.
Nested Class Summary | |
---|---|
protected static class |
ClientBase.CountdownWatcher
|
protected class |
ClientBase.NullWatcher
In general don't use this. |
Field Summary | |
---|---|
static int |
CONNECTION_TIMEOUT
|
protected String |
hostPort
|
protected static org.apache.log4j.Logger |
LOG
|
protected NIOServerCnxn.Factory |
serverFactory
|
protected File |
tmpDir
|
Constructor Summary | |
---|---|
ClientBase()
|
|
ClientBase(String name)
|
Method Summary | |
---|---|
protected ZooKeeper |
createClient()
|
protected ZooKeeper |
createClient(ClientBase.CountdownWatcher watcher,
String hp)
|
protected ZooKeeper |
createClient(String hp)
|
static File |
createTmpDir()
|
protected void |
setUp()
|
static void |
setupTestEnv()
Test specific setup |
protected void |
tearDown()
|
static boolean |
waitForServerDown(String hp,
long timeout)
|
static boolean |
waitForServerUp(String hp,
long timeout)
|
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger LOG
public static final int CONNECTION_TIMEOUT
protected String hostPort
protected NIOServerCnxn.Factory serverFactory
protected File tmpDir
Constructor Detail |
---|
public ClientBase()
public ClientBase(String name)
Method Detail |
---|
protected ZooKeeper createClient() throws IOException, InterruptedException
IOException
InterruptedException
protected ZooKeeper createClient(String hp) throws IOException, InterruptedException
IOException
InterruptedException
protected ZooKeeper createClient(ClientBase.CountdownWatcher watcher, String hp) throws IOException, InterruptedException
IOException
InterruptedException
public static boolean waitForServerUp(String hp, long timeout)
public static boolean waitForServerDown(String hp, long timeout)
public static File createTmpDir() throws IOException
IOException
public static void setupTestEnv()
protected void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
protected void tearDown() throws Exception
tearDown
in class junit.framework.TestCase
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |