Skip to content

Commit

Permalink
Delete constantly flaky test.
Browse files Browse the repository at this point in the history
  • Loading branch information
lowasser committed May 12, 2020
1 parent 1a7d220 commit 290537e
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions stub/src/test/java/io/grpc/kotlin/ClientCallsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -661,39 +661,4 @@ class ClientCallsTest: AbstractCallsTest() {
assertThat(responses.single()).isEqualTo(helloReply("Hello, Sunstone"))
assertThat(requestsEvaluations.get()).isEqualTo(2)
}

@ExperimentalCoroutinesApi
@Test
fun bidiStreamingCancelResponsesCancelsRequests() = runBlocking {
val serverImpl = object : GreeterGrpc.GreeterImplBase() {
override fun bidiStreamSayHello(
responseObserver: StreamObserver<HelloReply>
): StreamObserver<HelloRequest> {
return object : StreamObserver<HelloRequest> {
override fun onNext(value: HelloRequest) {
responseObserver.onNext(helloReply("Hello, ${value.name}"))
}

override fun onError(t: Throwable) = throw t

override fun onCompleted() {
responseObserver.onCompleted()
}
}
}
}

val channel = makeChannel(serverImpl)

val cancelled = Job()
val requests = flow {
emit(helloRequest("Steven"))
emit(helloRequest("Garnet"))
suspendUntilCancelled { cancelled.complete() }
}
assertThat(
ClientCalls.bidiStreamingRpc(channel, bidiStreamingSayHelloMethod, requests).take(2).toList()
).containsExactly(helloReply("Hello, Steven"), helloReply("Hello, Garnet")).inOrder()
cancelled.join()
}
}

0 comments on commit 290537e

Please sign in to comment.