Annotation Interface JUnitNatsServer


@Target({TYPE,ANNOTATION_TYPE}) @Retention(RUNTIME) @ExtendWith(NatsServer.class) public @interface JUnitNatsServer
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    File to nats server binary so no download will be needed
    Passes the original parameters to Nats.config(NatsConfig, String) for startup NatsConfig
    Config file
    Custom download URL
    boolean
    Prevents the NatsServer from recreating for each test class
    Nats server name
    int
    Sets nats port -1 means random port
    long
    Defines the startup and teardown timeout
  • Element Details

    • port

      int port
      Sets nats port -1 means random port
      Default:
      4222
    • timeoutMs

      long timeoutMs
      Defines the startup and teardown timeout
      Default:
      10000L
    • name

      String name
      Nats server name
      Default:
      ""
    • configFile

      String configFile
      Config file
      Default:
      ""
    • downloadUrl

      String downloadUrl
      Custom download URL
      Default:
      ""
    • binaryFile

      String binaryFile
      File to nats server binary so no download will be needed
      Default:
      ""
    • config

      String[] config
      Passes the original parameters to Nats.config(NatsConfig, String) for startup NatsConfig
      Default:
      {}
    • keepAlive

      boolean keepAlive
      Prevents the NatsServer from recreating for each test class
      Default:
      false