Class AsyncConfig
java.lang.Object
io.restassured.module.spring.commons.config.AsyncConfig
- All Implemented Interfaces:
io.restassured.config.Config
Configuration for async requests
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a defaultAsyncConfigwith timeout equal 1000 milliseconds (1 second).AsyncConfig(long timeoutInMs) Creates a newAsyncConfigwith timeout equal to the given number of milliseconds.AsyncConfig(long duration, TimeUnit timeUnit) Creates a newAsyncConfigwith timeout. -
Method Summary
Modifier and TypeMethodDescriptionstatic AsyncConfigJust syntactic sugar.booleantimeout(long timeoutInMs) Specify the timeout for the async request in milliseconds.Specify the timeout for the async request in milliseconds.longwith()Just syntactic sugar to make the DSL more english like.static AsyncConfigwithTimeout(long duration, TimeUnit timeUnit)
-
Constructor Details
-
AsyncConfig
public AsyncConfig()Creates a defaultAsyncConfigwith timeout equal 1000 milliseconds (1 second). -
AsyncConfig
public AsyncConfig(long timeoutInMs) Creates a newAsyncConfigwith timeout equal to the given number of milliseconds.- Parameters:
timeoutInMs- The timeunit in milliseconds.
-
AsyncConfig
Creates a newAsyncConfigwith timeout.- Parameters:
duration- The durationtimeUnit- The time unit
-
-
Method Details
-
withTimeout
-
asyncConfig
Just syntactic sugar.- Returns:
- A new instance of
AsyncConfig.
-
timeout
Specify the timeout for the async request in milliseconds.- Parameters:
timeoutInMs- The timeout in milliseconds.- Returns:
- A new instance of the MockMvcAsyncConfig
-
timeout
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:
isUserConfiguredin interfaceio.restassured.config.Config
-
with
Just syntactic sugar to make the DSL more english like.
-