@Override protected void after() {
    super.after();
    if (kafkaServer != null) {
      kafkaServer.shutdown();
      kafkaServer.awaitShutdown();
    }
    if (zkServer != null) {
      zkServer.shutdown();
    }
    try {
     FileUtils.deleteDirectory(new File(tmpLogDir.toString()));
    } catch (IOException e) {
      LOG.warn("did not clean " + tmpLogDir.toString(), e);
    }
  }
Override to tear down your specific external resource.
kafka-handler/src/test/org/apache/hadoop/hive/kafka/KafkaBrokerResource.java