Package org.apache.storm.testing

# 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 Summary

  Constructors
  Constructor
  Description
  `InProcessZookeeper()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `long`
  `getPort()`
  Get port.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### InProcessZookeeper

    public InProcessZookeeper() throws Exception
    Throws:
      `Exception`

- ## 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`