Class AsyncConfig

java.lang.Object
io.restassured.module.spring.commons.config.AsyncConfig
All Implemented Interfaces:
io.restassured.config.Config

public class AsyncConfig extends Object implements io.restassured.config.Config
Configuration for async requests
  • Constructor Details

    • AsyncConfig

      public AsyncConfig()
      Creates a default AsyncConfig with timeout equal 1000 milliseconds (1 second).
    • AsyncConfig

      public AsyncConfig(long timeoutInMs)
      Creates a new AsyncConfig with timeout equal to the given number of milliseconds.
      Parameters:
      timeoutInMs - The timeunit in milliseconds.
    • AsyncConfig

      public AsyncConfig(long duration, TimeUnit timeUnit)
      Creates a new AsyncConfig with timeout.
      Parameters:
      duration - The duration
      timeUnit - The time unit
  • Method Details

    • withTimeout

      public static AsyncConfig withTimeout(long duration, TimeUnit timeUnit)
    • asyncConfig

      public static AsyncConfig asyncConfig()
      Just syntactic sugar.
      Returns:
      A new instance of AsyncConfig.
    • timeout

      public AsyncConfig timeout(long timeoutInMs)
      Specify the timeout for the async request in milliseconds.
      Parameters:
      timeoutInMs - The timeout in milliseconds.
      Returns:
      A new instance of the MockMvcAsyncConfig
    • timeout

      public AsyncConfig timeout(long duration, TimeUnit timeUnit)
      Specify the timeout for the async request in milliseconds.
      Parameters:
      duration - The duration.
      timeUnit - The time unit for the duration.
      Returns:
      A new instance of the MockMvcAsyncConfig
    • timeoutInMs

      public long timeoutInMs()
      Returns:
      The timeout converted to milliseconds.
    • isUserConfigured

      public boolean isUserConfigured()
      Specified by:
      isUserConfigured in interface io.restassured.config.Config
    • with

      public AsyncConfig with()
      Just syntactic sugar to make the DSL more english like.