jamesfredley commented on PR #15411: URL: https://github.com/apache/grails-core/pull/15411#issuecomment-3928531757
@jdaugherty Added a declarative `@Client` interface (`MicronautTestClient.groovy`) and integration test (`MicronautDeclarativeClientSpec`). Results: - **`@Client` bean registration**: PASSES. The declarative client interface compiles via the Groovy AST transform (`micronaut-inject-groovy`) and is resolvable from the Micronaut context. - **Micronaut `HttpClient` calling the running Grails app**: PASSES. The Micronaut HTTP stack works within Grails. Note: The test requires `micronaut-http-client` and `micronaut-serde-jackson` as dependencies. Without `micronaut-serde-jackson`, the client bean registers but fails to instantiate with `No bean of type [io.micronaut.json.JsonMapper] exists`. This is expected - the JSON mapper must be on the classpath for the HTTP client infrastructure. Regarding ersatz/mock endpoint testing - I opted to test against the running Grails app itself rather than a mock server, since the integration test already boots the full application. This keeps the test dependencies minimal and directly tests the Grails+Micronaut integration path. -- 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]
