-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the OkHttp and Netty tests actually use OkHttp/Netty #928
Conversation
grpc-java chooses the client implementation by finding all `Provider`s on the classpath and picking the one with the highest priority. The `tests` module has both `grpc-netty` and `grpc-okhttp` on the classpath, so it will always choose the Netty implementation unless we specify otherwise. Added a couple of parameters to `ManagedChannelInterpreter`'s constructor to allow us to inject the appropriate implementation in tests, and updated the tests accordingly.
Codecov Report
@@ Coverage Diff @@
## master #928 +/- ##
==========================================
+ Coverage 88.70% 88.71% +0.01%
==========================================
Files 58 58
Lines 832 833 +1
Branches 3 2 -1
==========================================
+ Hits 738 739 +1
Misses 94 94
Continue to review full report at Codecov.
|
configList: List[ManagedChannelConfig] | ||
configList: List[ManagedChannelConfig], | ||
builderForAddress: (String, Int) => ManagedChannelBuilder[_] = ManagedChannelBuilder.forAddress, | ||
builderForTarget: String => ManagedChannelBuilder[_] = ManagedChannelBuilder.forTarget |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be this a breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is source-compatible because of the default arguments, but it is binary-incompatible: https://github.com/jatcwang/binary-compatibility-guide#dont-adding-parameters-with-default-values-to-methods
I'll leave the primary constructor alone and add a secondary constructor for use in tests.
)(implicit F: Sync[F]) { | ||
|
||
// Secondary constructor added for bincompat | ||
def this( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked locally using MiMa that this fixes the bincompat breakage
grpc-java chooses the client implementation by finding all
Provider
son the classpath and picking the one with the highest priority. The
tests
module has bothgrpc-netty
andgrpc-okhttp
on the classpath,so it will always choose the Netty implementation unless we specify
otherwise.
Added a couple of parameters to
ManagedChannelInterpreter
'sconstructor to allow us to inject the appropriate implementation in
tests, and updated the tests accordingly.
What this does?
Changes, features, fixes ...
Checklist