Annotation Type AwaitRoute


@Qualifier @Documented @Retention(RUNTIME) @Target({FIELD,PARAMETER}) public @interface AwaitRoute
When this annotation is present alongside RouteURL, Arquillian Cube will wait until the route becomes availabile. Availability is defined as returning a known good HTTP status code.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Path that should be appended to the root route URL for checking route availability.
    int
    How many times in a row the route must respond successfully to be considered available.
    int[]
    Set of HTTP status codes that are considered good.
    int
    How long to wait for the route URL to become available.
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Field Details

    • DEFAULT_PATH_FOR_ROUTE_AVAILABILITY_CHECK

      static final String DEFAULT_PATH_FOR_ROUTE_AVAILABILITY_CHECK
      See Also:
  • Element Details

    • path

      String path
      Path that should be appended to the root route URL for checking route availability. Useful when there's nothing exposed directly at the root route URL, only on some paths below. Defaults to RouteURL.path().

      If RouteURL.path() is set to a non-default value and this is also set to a non-default value, then these two values are not combined. For example:

       @RouteURL(value = "my-route", path = "/api/info")
       @AwaitRoute(path = "/api/health"))
       private URL myUrl;
       
      In this case, the injected route URL will be http://route.host/api/info, but the URL used for checking route availability will be http://route.host/api/health.
      Default:
      "__DEFAULT PATH FOR ROUTE AVAILABILITY CHECK__"
    • statusCode

      int[] statusCode
      Set of HTTP status codes that are considered good. Defaults to a single value, 200.
      Default:
      {200}
    • timeout

      int timeout
      How long to wait for the route URL to become available. Defaults to 5 minutes.
      Default:
      5
    • timeoutUnit

      TimeUnit timeoutUnit
      Default:
      MINUTES
    • repetitions

      int repetitions
      How many times in a row the route must respond successfully to be considered available. Defaults to 1.

      If the awaitRouteRepetitions configuration property is set to > 1, this annotation parameter is ignored.

      Default:
      1