-
-
Notifications
You must be signed in to change notification settings - Fork 973
Fix flaky RunningApplicationProcessSpec by widening the stop() timeout budget #16032
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -208,8 +208,8 @@ class RunningApplicationProcessSpec extends Specification { | |
| expect: | ||
| RunningApplicationProcess.isRunning(pidFile) | ||
|
|
||
| when: | ||
| def result = RunningApplicationProcess.stop(pidFile, 15000) | ||
| when: "a generous timeout budget gives headroom for reaper-notification lag on a contended CI runner" | ||
| def result = RunningApplicationProcess.stop(pidFile, 30000) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the part I would like confirmed before merge.
The candidate I would check first is the tail condition seven lines down, Worth ruling out as well: The Spock output from one flaky run settles which of these it is, since it prints the rendered condition and the actual
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You were right — the 15s→30s One more round worth flagging: my first pass at that polled |
||
|
|
||
| then: | ||
| result == RunningApplicationProcess.StopResult.STOPPED | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The block description explains why the number is large rather than what the stimulus is, so the Spock report ends up reading
when: a generous timeout budget gives headroom for reaper-notification lag on a contended CI runnerfor a step whose stimulus is simply "the application is stopped". It also undersells the change:30000is not an arbitrary generous value, it is exactly what the shippedstop-apppasses (grails-profiles/base/commands/stop-app.groovy:31). Saying that makes this an alignment with production instead of a number we grew until the test stopped failing.Also
30_000for consistency with the3_600_000Lliterals already in this file. If you want to go further, hoisting the value ontoRunningApplicationProcess(static final long DEFAULT_STOP_TIMEOUT_MILLIS = 30_000L) and using it from bothstop-app.groovyand here would leave one source of truth instead of two copies of the same magic number - fine to skip if you would rather keep the diff minimal.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done — the
when:label now reads"the application is stopped", and there's a comment noting30_000matches the valuestop-app.groovy:31passes in production, rather than framing it as an arbitrary generous number. Kept the underscore style consistent with the3_600_000Lliterals already in the file. Left theDEFAULT_STOP_TIMEOUT_MILLIShoist out per your "fine to skip" note, to keep the diff minimal.