Skip to content

//workflow/com.squareup.workflow1.testing/WorkflowTestRuntime/awaitNextSnapshot

awaitNextSnapshot

[jvm]
Content
fun awaitNextSnapshot(timeoutMs: Long? = null, skipIntermediate: Boolean = true): TreeSnapshot
More info

Blocks until the workflow emits a snapshot, then returns it.

The returned snapshot will be the snapshot only of the root workflow. It will be null if snapshotState returned an empty Snapshot.

Parameters

jvm

timeoutMs

The maximum amount of time to wait for a snapshot to be emitted. If null, DEFAULT_TIMEOUT_MS will be used instead.

skipIntermediate

If true, and the workflow has emitted multiple snapshots, all but the most recent one will be dropped.