Annotation Interface EmbeddedZookeeperServer


@Target(TYPE) @Retention(RUNTIME) @Documented @Inherited @ExtendWith(org.springframework.test.context.junit.jupiter.SpringExtension.class) @TestExecutionListeners(listeners=io.microsphere.spring.test.zookeeper.embedded.EmbeddedZookeeperServerTestExecutionListener.class, mergeMode=MERGE_WITH_DEFAULTS) public @interface EmbeddedZookeeperServer
The annotation to startup the Embedded Zookeeper server for Spring integration testing.
Since:
1.0.0
Author:
Mercy
See Also:
  • Context
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The resource location of the Zookeeper Server
    int
    The port of Zookeeper Server
    long
    The tick time of Zookeeper Server
  • Element Details

    • port

      int port
      The port of Zookeeper Server
      Returns:
      the default value of port : 2181
      Default:
      2181
    • dataDir

      String dataDir
      The resource location of the Zookeeper Server

      The value supports two types of locations:

      • File System, e.g: /tmp/catalina
      • Spring Resource location, e.g: classpath:/catalina, file:/temp/catalina
      Returns:
      the default value of basedir : The "java.io.tmpdir" system property (the directory where Java temporary directory) where a directory named Zookeeper Server.$PORT will be created. $PORT is the value configured via
      Default:
      "${java.io.tmpdir}/test-zookeeper-${port}"
    • tickTime

      long tickTime
      The tick time of Zookeeper Server
      Returns:
      the default value of tick time : 2000
      Default:
      2000L