final class CompositeStatus extends Status with Serializable
Composite Status that aggregates its completion and failed states of set of other Statuses passed to its constructor.
- Source
- Status.scala
- Alphabetic
- By Inheritance
- CompositeStatus
- Serializable
- Status
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def isCompleted(): Boolean
Non-blocking call to check if the test or suite run is completed, returns
trueif all compositeStatuses have completed,falseotherwise.Non-blocking call to check if the test or suite run is completed, returns
trueif all compositeStatuses have completed,falseotherwise. You can use this to poll the run status.- returns
trueif all compositeStatuses have completed,falseotherwise.
- Definition Classes
- CompositeStatus → Status
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def succeeds(): Boolean
Blocking call that waits until all composite
Statuses have completed, then returnstrueonly if all of the compositeStatuses succeeded.Blocking call that waits until all composite
Statuses have completed, then returnstrueonly if all of the compositeStatuses succeeded. If anyStatuspassed in thestatusesset fails, this method will returnfalse.- returns
trueif all compositeStatuses succeed,falseotherwise.
- Definition Classes
- CompositeStatus → Status
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def thenRun(f: => Status): Status
Registers a
Status-producing by-name function to execute after thisStatuscompletes, returning aStatusthat mirrors theStatusreturned by the by-name.Registers a
Status-producing by-name function to execute after thisStatuscompletes, returning aStatusthat mirrors theStatusreturned by the by-name.The
Statusreturned by this method will complete when the status produced by theStatusproduced by the passed-by name completes. The returnedStatuswill complete with the samesucceedsandunreportedExceptionvalues. But unlike theStatusproduced by the by-name, the returnedStatuswill be available immediately.If the by-name function passed to this method completes abruptly with a non-run-aborting exception, that exception will be caught and installed as the
unreportedExceptionon theStatusreturned by this method. TheStatusreturned 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-run-aborting exception will not be rethrown on that thread).If the by-name function passed to this method completes abruptly with a run-aborting exception, such as
StackOverflowError, that exception will be caught and a newjava.util.concurrent.ExecutionExceptionthat contains the run-aborting exception as its cause will be installed as theunreportedExceptionon theStatusreturned by this method. TheStatusreturned by this method will then complete. The original run-aborting 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 still be executed.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
ParallelTestExectionis mixed into an async style. Instead, tests are allowed to begin execution concurrently.- returns
a
Statusthat represents the status of executing the by-name function passed to this method.
- Definition Classes
- Status
- final def toFuture: Future[Boolean]
Converts this
Statusto aFuture[Boolean]whereSuccess(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 theReportervia a ScalaTest event,Failure(unreportedException)means an exception,unreportedException, was thrown that was not reported to theReportervia a ScalaTest event.Converts this
Statusto aFuture[Boolean]whereSuccess(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 theReportervia a ScalaTest event,Failure(unreportedException)means an exception,unreportedException, was thrown that was not reported to theReportervia a ScalaTest event.- returns
a
Future[Boolean]representing thisStatus.
- Definition Classes
- Status
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unreportedException: Option[Throwable]
An optional exception that has not been reported to the reporter for this run.
An optional exception that has not been reported to the reporter for this run.
This will be defined if any of the composite
Statuss (passed to thisStatus's constructor) has a definedunreportedException. If more than one compositeStatushas a definedunreportedException, one of them (not specified) will be reported by this method and the others will have their stack traces printed to standard output.- returns
a optional unreported
Throwable
- Definition Classes
- CompositeStatus → Status
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def waitUntilCompleted(): Unit
Blocking call that returns only after all composite
Statuss have completed.Blocking call that returns only after all composite
Statuss have completed.- Definition Classes
- CompositeStatus → Status
- def whenCompleted(f: (Try[Boolean]) => Unit): Unit
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.
- Definition Classes
- CompositeStatus → Status
- final def withAfterEffect(f: => Unit): Status
Registers a by-name function (producing an optional exception) to execute after this
Statuscompletes.Registers a by-name function (producing an optional exception) to execute after this
Statuscompletes.If the by-name function passed to this method completes abruptly with a non-run-aborting exception, that exception will be caught and installed as the
unreportedExceptionon theStatusreturned by this method. TheStatusreturned 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-run-aborting exception will not be rethrown on that thread).If the by-name function passed to this method completes abruptly with a run-aborting exception, such as
StackOverflowError, that exception will be caught and a newjava.util.concurrent.ExecutionExceptionthat contains the run-aborting exception as its cause will be installed as theunreportedExceptionon theStatusreturned by this method. TheStatusreturned by this method will then complete. The original run-aborting 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 theStatusreturned by this method.Internally, ScalaTest uses this method in traits
BeforeAndAfter,BeforeAndAfterEach, andBeforeAndAfterEachTestDatato ensure "after" code is executed after the relevant test has completed, and in traitsBeforeAndAfterAllandBeforeAndAfterAllConfigMapto ensure "after" code is executed after the relevant tests and nested suites have completed.- f
A by-name function to invoke after this
Statushas completed.- returns
a
Statusthat represents thisStatus, modified by any exception thrown by the passed by-name function.
- Definition Classes
- Status