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, getResource
public java.lang.String getZkConnectString()
public org.I0Itec.zkclient.ZkClient getZkClient()
public java.lang.String getBrokerAddress()
protected void obtainResource() throws java.lang.Exception
AbstractExternalResourceTestSupport
AbstractExternalResourceTestSupport.resource
field with a valid
resource and return normally, or throw an exception.obtainResource
in class AbstractExternalResourceTestSupport<java.lang.String>
java.lang.Exception
protected void cleanupResource() throws java.lang.Exception
AbstractExternalResourceTestSupport
AbstractExternalResourceTestSupport.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