play-grpc icon indicating copy to clipboard operation
play-grpc copied to clipboard

Improve port detection on testkit

Open ignasi35 opened this issue 6 years ago • 1 comments

To provide a client, play-grpc testkit scan the available endpoints looking for one supporting HTTP/2. The lookup should support other criteria (see comments in JavaAkkaGrpcClientHelpers)

e.g. a more correct code here should filter by HTTP/2 and user's akka.grpc.client."".use-tls and crash wonderfully if none is found.

Further improvements: what endpoint to choose if many endpoints fulfill both criteria (protocol version and use-tls) if/when we support such a setup.

Originally posted by @ignasi35 in https://github.com/playframework/play-grpc/pull/33/review_comment/create

ignasi35 avatar Jan 18 '19 18:01 ignasi35

Maybe reusing https://github.com/akka/akka/blob/master/akka-testkit/src/main/scala/akka/testkit/SocketUtil.scala#L18 ?

ignasi35 avatar Nov 02 '20 18:11 ignasi35