Class TestOptions
java.lang.Object
io.vertx.ext.unit.report.ReportingOptions
io.vertx.ext.unit.TestOptions
Test execution options:
- the
timeoutin milliseconds, the default value is 2 minutes - the
useEventLoop configures the event loop usage
truealways runs with an event loopfalsenever runs with an event loopnulluses an event loop if there is one (provided byVertx.currentContext()) otherwise run without- the
reportersis an array of reporter configurations
- Author:
- Julien Viet
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longThe default time out value in milliseconds: 2 minutes.static final BooleanThe default value for using or not the event loop:null. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new empty options, with the default time out and no reporters.TestOptions(JsonObject json) Create a new options from the specified json.TestOptions(TestOptions other) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionaddReporter(ReportOptions reportOptions) Add a reporter to the current list.longsetReporters(List<ReportOptions> reporters) Replace the current list of reporters with a new one.setTimeout(long timeout) Set the test timeout.setUseEventLoop(Boolean useEventLoop) Configure the execution to use an event loop when there is no one existing.toJson()Methods inherited from class ReportingOptions
getReporters
-
Field Details
-
DEFAULT_TIMEOUT
public static final long DEFAULT_TIMEOUTThe default time out value in milliseconds: 2 minutes.- See Also:
-
DEFAULT_USE_EVENT_LOOP
The default value for using or not the event loop:null.
-
-
Constructor Details
-
TestOptions
public TestOptions()Create a new empty options, with the default time out and no reporters. -
TestOptions
-
TestOptions
Create a new options from the specified json.- Parameters:
json- the json to create from
-
-
Method Details
-
getTimeout
public long getTimeout()- Returns:
- the current timeout in milliseconds.
-
setTimeout
Set the test timeout.- Parameters:
timeout- the timeout value in milliseconds.- Returns:
- a reference to this, so the API can be used fluently
-
isUseEventLoop
- Returns:
- true if the execution should use an event loop when there is no one existing
-
setUseEventLoop
Configure the execution to use an event loop when there is no one existing.- Parameters:
useEventLoop- the even loop usage- Returns:
- a reference to this, so the API can be used fluently
-
addReporter
Description copied from class:ReportingOptionsAdd a reporter to the current list.- Overrides:
addReporterin classReportingOptions- Parameters:
reportOptions- the options of the reporter to use- Returns:
- a reference to this, so the API can be used fluently
-
setReporters
Description copied from class:ReportingOptionsReplace the current list of reporters with a new one.- Overrides:
setReportersin classReportingOptions- Parameters:
reporters- the new reporters- Returns:
- a reference to this, so the API can be used fluently
-
toJson
- Overrides:
toJsonin classReportingOptions- Returns:
- the json modelling the current configuration
-