This is an automated email from the ASF dual-hosted git repository.

borinquenkid pushed a commit to branch 
fix/flaky-running-application-process-timeout
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit e71d9fad23c791c88adbe9b967fd9c3cc66a3eba
Author: Walter Duque de Estrada <[email protected]>
AuthorDate: Tue Jul 21 16:03:44 2026 -0500

    Fix flaky RunningApplicationProcessSpec stop timeout
    
    "stop terminates a running process and removes the PID file" flakes
    (~2% of CI runs, apache/grails-core#16030) because it budgets only
    15000ms for RunningApplicationProcess.stop() to observe the spawned
    process's exit. stop() destroys the process then blocks on
    ProcessHandle.onExit().get(timeoutMillis, MILLISECONDS); on a
    contended CI runner (parallel Gradle test forks each spawning
    subprocess children) the JVM's process-reaper notification can
    occasionally lag past that budget, causing stop() to fall through to
    STILL_RUNNING instead of STOPPED. This is a timing-budget issue, not
    a logic bug in stop()/awaitExit().
    
    Raise the timeout passed at the call site from 15000ms to 30000ms to
    give more headroom on loaded runners, mirroring the same fix pattern
    already applied to this file for a prior Windows-specific race
    (6c76333ea9, a13c38c3fd).
    
    Co-Authored-By: Claude Sonnet 5 <[email protected]>
---
 .../groovy/org/grails/cli/gradle/RunningApplicationProcessSpec.groovy | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/grails-shell-cli/src/test/groovy/org/grails/cli/gradle/RunningApplicationProcessSpec.groovy
 
b/grails-shell-cli/src/test/groovy/org/grails/cli/gradle/RunningApplicationProcessSpec.groovy
index 1931d2154c..c65e7cf901 100644
--- 
a/grails-shell-cli/src/test/groovy/org/grails/cli/gradle/RunningApplicationProcessSpec.groovy
+++ 
b/grails-shell-cli/src/test/groovy/org/grails/cli/gradle/RunningApplicationProcessSpec.groovy
@@ -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)
 
         then:
         result == RunningApplicationProcess.StopResult.STOPPED

Reply via email to