Open joroKr21 opened 1 month ago
can you add tests for the new functionality?
I don't quite understand the testing machinery here. How can we test backpressure?
@thesamet it's not possible to test backpressure reliably because the server just keeps sending messages. See: https://github.com/scalapb/zio-grpc/blob/5d29b6e0e55800c59ed6c48d16d5a07da96b840c/core/src/main/scalajvm/scalapb/zio_grpc/server/ZServerCallHandler.scala#L115
The check to call.call.isReady
succeeds and is not related to call.awaitReady
:
def isReady: UIO[Boolean] = ZIO.succeed(call.isReady())
private[zio_grpc] def awaitReady: UIO[Unit] = canSend.acquire.commit
private[zio_grpc] def setReady(): UIO[Unit] = canSend.release.commit
I don't know if that's intended or not but it means that test service keeps sending me messages I didn't request
in the client.
Closes #631