test(amber): warm up ReconfigurationIntegrationSpec before timed assertions#4947
Merged
Yicong-Huang merged 2 commits intoapache:mainfrom May 6, 2026
Merged
Conversation
…rtions The first test in this suite intermittently times out on the 5-second `Await.result(client.controllerInterface.startWorkflow(...))` while the next test in the same JVM passes with the same budget — the cost is JVM-side first-touch (JIT, pekko dispatcher, RegionExecutionCoordinator class loading), not anything the test itself controls. Run a trivial pure-Scala TextInput → terminal workflow once in `beforeAll` so the JIT/class-loading bill is paid before any timed assertion. No Python is involved, so the warmup itself doesn't recreate the Python-worker cold-start cost it's trying to absorb on the JVM side. Hard cap the warmup at 10 seconds and wrap it in try/catch/finally: - Both Awaits use the same 10s ceiling, so warmup can never hang the suite. - Any exception is logged and swallowed; the existing `Retries` mixin still backs up individual test cases. - `client.shutdown()` and `cleanupWorkflowExecutionData()` always run. Refs apache#4946.
fd1c17b to
8c0d69a
Compare
aglinxinyuan
approved these changes
May 5, 2026
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.
What changes were proposed in this PR?
Add a
warmupOnce()step toReconfigurationIntegrationSpec.beforeAllthat runs a trivial pure-ScalaTextInputSourceOpDescworkflow before the timed test cases. This pays the JVM JIT + class-loading + pekko first-touch bill before the firstAwait.result(client.controllerInterface.startWorkflow(...), 5.seconds)runs inTestUtils.shouldReconfigure, which is where the suite has been intermittently timing out.The warmup is pure Scala (no Python), hard-capped at 10 seconds, and defensively wrapped: any exception is logged and swallowed,
client.shutdown()andcleanupWorkflowExecutionData()always run, so warmup itself can never hang the suite. The existingRetriesmixin still backs up individual test cases.Any related issues, documentation, discussions?
Closes #4946.
How was this PR tested?
sbt WorkflowExecutionService/Test/compileclean;sbt WorkflowExecutionService/scalafmtCheckAllclean. CIamber-integrationjob is the real test surface.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.7 (Claude Code)