Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Async

An asynchronous exit point for a test.

Hierarchy

Index

Methods

await

  • await(): void
  • await(timeoutMillis: number): void
  • Cause the current thread to wait until this completion completes.

    If the current thread is interrupted, an exception will be thrown.

    Returns void

  • 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.

    Parameters

    • timeoutMillis: number

    Returns void

awaitSuccess

  • awaitSuccess(): void
  • awaitSuccess(timeoutMillis: number): void
  • 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.

    Returns void

  • 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.

    Parameters

    • timeoutMillis: number

    Returns void

complete

  • complete(): void
  • Signals the asynchronous operation is done, this method must be called with a count greater than 0, otherwise it throws an IllegalStateException to signal the error.

    Returns void

count

  • count(): number
  • Returns number

countDown

  • countDown(): void
  • Count down the async.

    Returns void

handler

  • handler(): PromiseLike<void>
  • handler(completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): void
  • Completion handler to receive a completion signal when this completions completes.

    Returns PromiseLike<void>

  • Completion handler to receive a completion signal when this completions completes.

    Parameters

    • completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>

    Returns void

isCompleted

  • isCompleted(): boolean
  • Returns boolean

isFailed

  • isFailed(): boolean
  • Returns boolean

isSucceeded

  • isSucceeded(): boolean
  • Returns boolean

resolve

  • resolve(future: Promise<void>): void
  • Completes the future upon completion, otherwise fails it.

    Parameters

    • future: Promise<void>

    Returns void

Generated using TypeDoc