-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix gRPC over cmux and add unit tests #1758
Fix gRPC over cmux and add unit tests #1758
Conversation
Signed-off-by: Yuri Shkuro <ys@uber.com>
cmd/query/app/server_test.go
Outdated
server := NewServer(flagsSvc, querySvc, &QueryOptions{Port: ports.QueryAdminHTTP, | ||
BearerTokenPropagation: true}, tracer) | ||
server := NewServer(flagsSvc, querySvc, | ||
&QueryOptions{Port: ports.QueryAdminHTTP, BearerTokenPropagation: true}, |
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.
Changing the listening port here to -
&QueryOptions{Port: ports.QueryHTTP, BearerTokenPropagation: true},
.. and using cmuxServer.MatchWithWriters(...)
as suggested by @32leaves seems to work for me.
We definitely needed an integration test with cmux though, thanks for pointing out!
breaking change: grpc/grpc-go#2406 workaround described in: - soheilhy/cmux#64 - https://github.com/soheilhy/cmux#limitations Signed-off-by: Christian Weichel <christian.weichel@typefox.io>
Signed-off-by: Yuri Shkuro <ys@uber.com>
Signed-off-by: Yuri Shkuro <ys@uber.com>
Signed-off-by: Yuri Shkuro <ys@uber.com>
Signed-off-by: Yuri Shkuro <ys@uber.com>
Codecov Report
@@ Coverage Diff @@
## master #1758 +/- ##
==========================================
+ Coverage 98.26% 98.26% +<.01%
==========================================
Files 195 195
Lines 9533 9534 +1
==========================================
+ Hits 9368 9369 +1
Misses 131 131
Partials 34 34
Continue to review full report at Codecov.
|
@pavolloffay can you review? |
* Add unit test for gRPC over cmux Signed-off-by: Yuri Shkuro <ys@uber.com> * Fix tests Signed-off-by: Yuri Shkuro <ys@uber.com> * Fix gRPC query service cmux breaking change: grpc/grpc-go#2406 workaround described in: - soheilhy/cmux#64 - https://github.com/soheilhy/cmux#limitations Signed-off-by: Christian Weichel <christian.weichel@typefox.io> * Fix asertions Signed-off-by: Yuri Shkuro <ys@uber.com> * Use DialContext Signed-off-by: Yuri Shkuro <ys@uber.com> * Clean-up timeouts Signed-off-by: Yuri Shkuro <ys@uber.com>
Resolves #1754
Includes the main commit by @32leaves from #1756