playframework / play-grpc

Play + Pekko gRPC
Apache License 2.0
35 stars 29 forks source link

Improve port detection on testkit #34

Open ignasi35 opened 5 years ago

ignasi35 commented 5 years ago

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 commented 4 years ago

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