Remove Netty dependency exclude from tests#383
Remove Netty dependency exclude from tests#383artembilan merged 2 commits intospring-projects:mainfrom
Conversation
To disable the activation of the Netty server when using the inprocess server add `@AutoConfigureTestGrpcTransport` to the test.
| }, | ||
| target = "in-process:test" | ||
| ) | ||
| @AutoConfigureTestGrpcTransport |
There was a problem hiding this comment.
Thanks.
I don’t know what this annotation is doing and I don’t say that there is something wrong in your solution, but I wonder if there is some overlap with this annotation and those explicit properties for `inprocess'. In general I have feeling that if I go this annotation, then I don’t need those properties: they should be inferred from this annotation . Perhaps some further idea how to improve Spring Boot experience
There was a problem hiding this comment.
This was based on a recommendation from @philwebb. In short AutoConfigureTestGrpcTransport
enables auto-configuration of the GrpcServletRegistration, GrpcServerFactory, GrpcChannelFactory. When using this annotation the defaults for these autoconfigurations is false, thus in our case the servlet engine is not autoconfigured.
You are correct that we can now remove the explicit properties.
With the use of the `@AutoConfigureTestGrpcTransport` these are no longer necessary
To disable the activation of the Netty server when using the inprocess server add
@AutoConfigureTestGrpcTransportto the test.