grpc / grpc-kotlin

Kotlin gRPC implementation. HTTP/2 based RPC
https://grpc.io/docs/languages/kotlin
Apache License 2.0
1.2k stars 163 forks source link

Unable to build io.grpc:grpc-kotlin-stub locally #146

Open skomp opened 4 years ago

skomp commented 4 years ago

We are attempting at using a prerelease in our project since we need #66 to implement proper opentracing with grpc and coroutines. Unfortunately, the latest master's gradle build fails with exceptions in testCompile:

e: /Users/robertmassow/src/github.com/grpc/grpc-kotlin/stub/src/test/java/io/grpc/kotlin/CoroutineContextServerInterceptorTest.kt: (19, 65): Unresolved reference: testing
e: /Users/robertmassow/src/github.com/grpc/grpc-kotlin/stub/src/test/java/io/grpc/kotlin/CoroutineContextServerInterceptorTest.kt: (45, 31): Type mismatch: inferred type is CoroutineContextServerInterceptorTest.HelloReplyWithContextMessage but ServerMethodDefinition<*, *> was expected
e: /Users/robertmassow/src/github.com/grpc/grpc-kotlin/stub/src/test/java/io/grpc/kotlin/CoroutineContextServerInterceptorTest.kt: (68, 19): None of the following functions can be called with the arguments supplied: 
public final fun makeChannel(impl: BindableService): ManagedChannel defined in io.grpc.kotlin.CoroutineContextServerInterceptorTest
public final fun makeChannel(impl: ServerMethodDefinition<*, *>, vararg interceptors: ServerInterceptor): ManagedChannel defined in io.grpc.kotlin.CoroutineContextServerInterceptorTest
e: /Users/robertmassow/src/github.com/grpc/grpc-kotlin/stub/src/test/java/io/grpc/kotlin/CoroutineContextServerInterceptorTest.kt: (93, 31): Type mismatch: inferred type is CoroutineContextServerInterceptorTest.HelloReplyWithContextMessage but ServerMethodDefinition<*, *> was expected
skomp commented 4 years ago

I opened #147 but unfortunately there seems to be a flaky test. It addresses the compile issues, though.

bshaffer commented 4 years ago

This should be fixed in #145 where I removed the @com.google.testing.testsize.MediumTest annotation. Can you try again?

skomp commented 4 years ago

Thanks, it has been fixed in #148 I think where it also has been removed and the missing functions where added :) I think there is still a flaky test (io.grpc.kotlin.GeneratedCodeTest > clientStreamingRpcCancellation) that failed here: https://github.com/grpc/grpc-kotlin/pull/147/checks?check_run_id=894071461#step:4:331 Unfortunately, I was unable to reproduce this locally and thus did not provide a PR for rhis.

I will close the PR I opened then since all fixes provided there have already been introduced and it adds no value. Feel free to close this issue if you don't think that the test is flaky or it simply is no issue.