Add optional auto-advance controls for workflow test runtimes#1485
Merged
steve-the-edwards merged 3 commits intomainfrom Mar 13, 2026
Merged
Add optional auto-advance controls for workflow test runtimes#1485steve-the-edwards merged 3 commits intomainfrom
steve-the-edwards merged 3 commits intomainfrom
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-019ce7ff-661f-761c-a912-192bf9da1eb9 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ce7ff-661f-761c-a912-192bf9da1eb9 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ce7ff-661f-761c-a912-192bf9da1eb9 Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
autoAdvanceOnStartuptoWorkflowTestParams(defaulttrue) so startup scheduler draining can be disabled when tests need to assert initial UI firstautoAdvanceBeforeAwaitandautoAdvanceBeforeHasChecktoWorkflowTestParams(both defaulttrue) to control scheduler draining behavior in deprecatedlaunchForTesting*runtimesadvanceSchedulerparameters toawaitNextRendering,awaitNextOutput, andawaitNextSnapshotonWorkflowTestRuntimeautoAdvanceBeforeAwaitintoWorkflowTurbine.awaitNext*defaults, which deprecated launch wrappers now use under the hoodDeprecatedLaunchSchedulerModeTestfor startup, await, and has-check auto-advance control pathsworkflow-testingAPI dumpPurpose
The value of all of this is to minimize the churn needed to migrate to use this updated version of the API in client tests.
Validation
./gradlew :workflow-testing:ktlintCheck./gradlew :workflow-testing:test --tests com.squareup.workflow1.testing.DeprecatedLaunchSchedulerModeTest --tests com.squareup.workflow1.testing.WorkflowTurbineTest --tests com.squareup.workflow1.testing.WorkflowTestRuntimeTest :workflow-testing:apiDump