Package com.attivio.sdk.test
Class ZooRule
- java.lang.Object
-
- com.attivio.sdk.test.SdkRule
-
- com.attivio.sdk.test.ZooRule
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class ZooRule extends SdkRule
Taken from apache curator BaseClassForTests. A low-level rule for testing zookeeper-based recipes. Encapsulates an SdkRule instance.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.runners.model.Statement
apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
org.apache.curator.framework.CuratorFramework
curator()
org.apache.curator.framework.CuratorFramework
newCurator()
org.apache.curator.framework.CuratorFramework[]
newCurators(int size)
void
resetServer()
Completely destroys current ZK and its datavoid
startServer(org.apache.curator.framework.CuratorFramework cf)
void
stopServer()
void
triggerReconnect(org.apache.curator.framework.CuratorFramework cf)
-
Methods inherited from class com.attivio.sdk.test.SdkRule
initializeLogging
-
-
-
-
Method Detail
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
Description copied from class:SdkRule
-
triggerReconnect
public void triggerReconnect(org.apache.curator.framework.CuratorFramework cf) throws java.lang.Exception
- Parameters:
cf
-- Throws:
java.lang.Exception
-
stopServer
public void stopServer() throws java.io.IOException
- Throws:
java.io.IOException
-
startServer
public void startServer(org.apache.curator.framework.CuratorFramework cf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
curator
public org.apache.curator.framework.CuratorFramework curator()
-
newCurators
public org.apache.curator.framework.CuratorFramework[] newCurators(int size)
-
newCurator
public org.apache.curator.framework.CuratorFramework newCurator()
-
resetServer
public void resetServer() throws java.lang.Exception
Completely destroys current ZK and its data- Throws:
java.lang.Throwable
java.lang.Exception
-
-