PekkoGrpcClientHelpers

play.grpc.testkit.PekkoGrpcClientHelpers
See thePekkoGrpcClientHelpers companion object

Helpers to test gRPC clients with Play. The methods in this class require an implicit PekkoGrpcClientFactory.Configured[T] to be in scope. This can usually be done by mixing in a method that knows how to configure the factory for the current environment, e.g. by configuring the correct port values.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Classlikes

final class WithGrpcClient[T <: PekkoGrpcClient]

Runs a block of code with a gRPC client, closing the client afterwards.

Runs a block of code with a gRPC client, closing the client afterwards.

Type parameters

T

The type of gRPC client.

Attributes

Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def grpcClient[T <: PekkoGrpcClient](implicit factory: Configured[T]): T

Get a gRPC client to connect to the currently running test server. Remember to close it afterwards, or use withGrpcClient to have it closed automatically.

Get a gRPC client to connect to the currently running test server. Remember to close it afterwards, or use withGrpcClient to have it closed automatically.

Attributes

def withGrpcClient[T <: PekkoGrpcClient]: WithGrpcClient[T]

Create a gRPC client to connect to the currently running test server.

Create a gRPC client to connect to the currently running test server.

Type parameters

T

The type of client to create.

Attributes