jamesfredley opened a new pull request, #15485: URL: https://github.com/apache/grails-core/pull/15485
## Summary - Add `@Retry(count = 2, delay = 200)` to the flaky `MicronautErsatzRoundtripSpec."full roundtrip: ersatz mocks empty response body"` test ## Problem This test intermittently fails on CI with: ``` HttpClientException: Client 'grails-self': Error occurred reading HTTP response: Connection reset ``` Observed in Groovy Joint Validation Build run [22598688156](https://github.com/apache/grails-core/actions/runs/22598688156). ### Root Cause The `ErsatzServer` is created per test method (`@AutoCleanup`, not `@Shared`) on a fixed port (19876). Between test methods, the server is stopped and a new one is started on the same port. The Micronaut `@Client(id = 'grails-self')` HTTP client maintains a connection pool, so stale connections from the previous test's Ersatz instance can cause `Connection reset` when reused against the new server. ### Fix Add Spock's `@Retry` annotation scoped to `HttpClientException` only, so only transient connection issues trigger a retry (up to 2 retries with 200ms delay). This follows the standard pattern for CI-flaky network tests without masking real failures. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
