interface Completion<T : Any>
A completion object that emits completion notifications either succeeded or failed.
Author
Julien Viet
abstract fun await(): Unit
Cause the current thread to wait until this completion completes. If the current thread is interrupted, an exception will be thrown. abstract fun await(timeoutMillis: Long): Unit
Cause the current thread to wait until this completion completes with a configurable timeout. If completion times out or the current thread is interrupted, an exception will be thrown. |
|
abstract fun awaitSuccess(): Unit
Cause the current thread to wait until this completion completes and succeeds. If the current thread is interrupted or the suite fails, an exception will be thrown. abstract fun awaitSuccess(timeoutMillis: Long): Unit
Cause the current thread to wait until this completion completes and succeeds with a configurable timeout. If completion times out or the current thread is interrupted or the suite fails, an exception will be thrown. |
|
abstract fun handler(completionHandler: Handler<AsyncResult<T>>): Unit
Completion handler to receive a completion signal when this completions completes. |
|
abstract fun isCompleted(): Boolean |
|
abstract fun isFailed(): Boolean |
|
abstract fun isSucceeded(): Boolean |
|
abstract fun resolve(future: Future<T>): Unit
Completes the future upon completion, otherwise fails it. |
interface Async : Completion<Void>
An asynchronous exit point for a test. |
|
interface TestCompletion : Completion<Void>
This object provides callback-ability for the end of a test suite, the completion succeeds when all tests pass otherwise it fails. |