public class KafkaTestSupport extends AbstractExternalResourceTestSupport<java.lang.String>
Rule that starts an embedded Kafka server (with an associated Zookeeper)| Modifier and Type | Field and Description |
|---|---|
static boolean |
embedded |
logger, resource, XD_EXTERNAL_SERVERS_REQUIRED| Constructor and Description |
|---|
KafkaTestSupport() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupResource()
Perform cleanup of the
AbstractExternalResourceTestSupport.resource field, which is guaranteed to be non null. |
java.lang.String |
getBrokerAddress() |
org.I0Itec.zkclient.ZkClient |
getZkClient() |
java.lang.String |
getZkConnectString() |
protected void |
obtainResource()
Try to obtain and validate a resource.
|
apply, getResourcepublic java.lang.String getZkConnectString()
public org.I0Itec.zkclient.ZkClient getZkClient()
public java.lang.String getBrokerAddress()
protected void obtainResource()
throws java.lang.Exception
AbstractExternalResourceTestSupportAbstractExternalResourceTestSupport.resource field with a valid
resource and return normally, or throw an exception.obtainResource in class AbstractExternalResourceTestSupport<java.lang.String>java.lang.Exceptionprotected void cleanupResource()
throws java.lang.Exception
AbstractExternalResourceTestSupportAbstractExternalResourceTestSupport.resource field, which is guaranteed to be non null.cleanupResource in class AbstractExternalResourceTestSupport<java.lang.String>java.lang.Exception - any exception thrown by this method will be logged and swallowed