This is an automated email from the ASF dual-hosted git repository.
borinquenkid pushed a commit to branch
refactor/java-to-groovy-grails-data-mongodb
in repository https://gitbox.apache.org/repos/asf/grails-core.git
The following commit(s) were added to
refs/heads/refactor/java-to-groovy-grails-data-mongodb by this push:
new 0f2d474d84 test(startup-progress): report the answers a timed-out
awaitStatus saw
0f2d474d84 is described below
commit 0f2d474d844174d200e9e52fd0fc9e60b382bae3
Author: Walter Duque de Estrada <[email protected]>
AuthorDate: Mon Oct 12 20:29:09 2026 -0500
test(startup-progress): report the answers a timed-out awaitStatus saw
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
---
.../org/apache/grails/startup/StartupProgressSpec.groovy | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git
a/grails-startup-progress/src/test/groovy/org/apache/grails/startup/StartupProgressSpec.groovy
b/grails-startup-progress/src/test/groovy/org/apache/grails/startup/StartupProgressSpec.groovy
index 6df4c1cac2..39312e74d6 100644
---
a/grails-startup-progress/src/test/groovy/org/apache/grails/startup/StartupProgressSpec.groovy
+++
b/grails-startup-progress/src/test/groovy/org/apache/grails/startup/StartupProgressSpec.groovy
@@ -1021,15 +1021,23 @@ class StartupProgressSpec extends Specification {
}
private Response awaitStatus(String phase) {
- long deadline = System.nanoTime() + TimeUnit.SECONDS.toNanos(30)
+ long start = System.nanoTime()
+ long deadline = start + TimeUnit.SECONDS.toNanos(30)
+ List<String> polls = []
+ String previous = null
while (System.nanoTime() < deadline) {
Response response = status()
if (response?.phase == phase) {
return response
}
+ String seen = response?.phase ?: 'no answer'
+ if (seen != previous) {
+ polls << "${TimeUnit.NANOSECONDS.toMillis(System.nanoTime() -
start)}ms: ${seen}".toString()
+ previous = seen
+ }
Thread.sleep(50)
}
- throw new AssertionError("No ${phase} status within 30 seconds")
+ throw new AssertionError("No ${phase} status within 30 seconds;
answers by change: ${polls}; runner alive: ${runner?.alive}; run failure:
${runFailure}")
}
private Response status(String contextPath = '') {