Non-blocking call to check if the test or suite run is completed, returns true if all composite Statuses have completed,
false otherwise.
Non-blocking call to check if the test or suite run is completed, returns true if all composite Statuses have completed,
false otherwise. You can use this to poll the run status.
true if all composite Statuses have completed, false otherwise.
Blocking call that waits until all composite Statuses have completed, then returns
true only if all of the composite Statuses succeeded.
Blocking call that waits until all composite Statuses have completed, then returns
true only if all of the composite Statuses succeeded. If any Status passed in the statuses set fails, this method
will return false.
true if all composite Statuses succeed, false otherwise.
Registers a Status-producing by-name function to execute after this
Status completes, returning a Status that mirrors the Status
returned by the by-name.
Registers a Status-producing by-name function to execute after this
Status completes, returning a Status that mirrors the Status
returned by the by-name.
The Status returned by this method will complete when the status produced by the
Status produced by the passed-by name completes. The returned Status
will complete with the same succeeds and unreportedException values.
But unlike the Status produced by the by-name, the returned Status will
be available immediately.
If the by-name function passed to this method completes abruptly with a non-test-fatal exception,
that exception will be caught and installed as the unreportedException on the
Status returned by this method. The Status returned by this method
will then complete. The thread that attempted to evaluate the by-name function will be allowed
to continue (i.e., the non-test-fatal exception will not be rethrown
on that thread).
If the by-name function passed to this method completes abruptly with a test-fatal exception,
such as StackOverflowError, that exception will be caught and a new
java.util.concurrent.ExecutionException that contains the test-fatal exception as its
cause will be installed as the unreportedException on the
Status returned by this method. The Status returned by this method
will then complete. The original test-fatal exception will then be rethrown on the
thread that attempted to evaluate the by-name function.
If an unreported exception is installed on this Status, the passed by-name function will
not be executed. Instead, the same unreported exception will be installed on the Status
returned by this method.
Internally, ScalaTest uses this method in async styles to ensure that by default, each subsequent test in an async-style
suite begins execution only after the previous test has completed. This method is not used if
ParallelTestExection is mixed into an async style. Instead, tests are allowed to begin
execution concurrently.
a Status that represents the status of executing the by-name function passed to this method.
Converts this Status to a Future[Boolean] where Success(true) means
no tests failed and suites aborted, Success(false), means at least one test failed or one
suite aborted and any thrown exception was was reported to the Reporter via a ScalaTest
event, Failure(unreportedException) means
an exception, unreportedException, was thrown that was not reported to the Reporter
via a ScalaTest event.
Converts this Status to a Future[Boolean] where Success(true) means
no tests failed and suites aborted, Success(false), means at least one test failed or one
suite aborted and any thrown exception was was reported to the Reporter via a ScalaTest
event, Failure(unreportedException) means
an exception, unreportedException, was thrown that was not reported to the Reporter
via a ScalaTest event.
a Future[Boolean] representing this Status.
If this is defined, it means a suite needs to be aborted because of this exception. This one will include ones that come because one of the nested statuses ended up with an unreported exception or a callback registered with whenCompleted?
If this is defined, it means a suite needs to be aborted because of this exception. This one will include ones that come because one of the nested statuses ended up with an unreported exception or a callback registered with whenCompleted?
a optional unreported Throwable
Blocking call that returns only after all composite Statuss have completed.
Blocking call that returns only after all composite Statuss have completed.
Registers the passed function to be executed when this status completes.
Registers the passed function to be executed when this status completes.
You may register multiple functions, which on completion will be executed in an undefined order.
Registers a by-name function (producing an optional exception) to execute
after this Status completes.
Registers a by-name function (producing an optional exception) to execute
after this Status completes.
If the by-name function passed to this method completes abruptly with a non-test-fatal exception,
that exception will be caught and installed as the unreportedException on the
Status returned by this method. The Status returned by this method
will then complete. The thread that attempted to evaluate the by-name function will be allowed
to continue (i.e., the non-test-fatal exception will not be rethrown
on that thread).
If the by-name function passed to this method completes abruptly with a test-fatal exception,
such as StackOverflowError, that exception will be caught and a new
java.util.concurrent.ExecutionException that contains the test-fatal exception as its
cause will be installed as the unreportedException on the
Status returned by this method. The Status returned by this method
will then complete. The original test-fatal exception will then be rethrown on the
thread that attempted to evaluate the by-name function.
If an unreported exception is installed on this Status, the passed by-name function will
not be executed. Instead, the same unreported exception will be installed on the Status
returned by this method.
Internally, ScalaTest uses this method in traits BeforeAndAfter,
BeforeAndAfterEach, and BeforeAndAfterEachTestData to ensure "after" code is
executed after the relevant test has completed, and in traits BeforeAndAfterAll and
BeforeAndAfterAllConfigMap to ensure "after" code is executed after the
relevant tests and nested suites have completed.
A by-name function to invoke after this Status has completed.
a Status that represents this Status,
modified by any exception thrown by the passed by-name function.
Composite
Statusthat aggregates its completion and failed states of set of otherStatuses passed to its constructor.The tricky one here is what if multiple unreported exceptions exist in the inner statuses. For that I might pick the highest priority one? I.e., if there's a fatal one pick that? Nah, not really. Just pick a random one and printStackTrace the others? Sure why not.