Class InProcessZookeeper

java.lang.Object
org.apache.storm.testing.InProcessZookeeper
All Implemented Interfaces:
AutoCloseable

public class InProcessZookeeper extends Object implements AutoCloseable
A local Zookeeper instance available for testing. ```java try (InProcessZookeeper zk = new InProcessZookeeper) { // Run Tests... } ```
  • Constructor Details

  • Method Details

    • getPort

      public long getPort()
      Get port.
      Returns:
      the port ZK is listening on (localhost)
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception