grpcmock icon indicating copy to clipboard operation
grpcmock copied to clipboard

How to make GrpcMock work for Armeria defined clients

Open sachinstar2010 opened this issue 2 years ago • 1 comments

I am using Armeria https://armeria.dev/docs/client-grpc and creating a Grpc Client like this

val client = Clients .builder(url) .decorator(LoggingClient.newDecorator()) .build(DownstreamServiceGrpc.DownstreamServiceBlockingStub::class.java)

And then making a call with,

client.someGrpcMethod()

I am running integration test with SpringBootTest and I am not able to stub the downstream call.

Also the url looks like, in application.yml, as:

url: gproto+https://localhost:${grpcmock.server.port:443}

I have tried adding the grpcmock.server.port this way, but it doesn't seem to take effect. Any way around this?

sachinstar2010 avatar Mar 21 '22 10:03 sachinstar2010

Hi @sachinstar2010 I haven't used Armeria personally, so it's hard to tell what wrong based on the info you've provided. If you could provide your full test setup or a sample project to reproduce it I could look into it.

Fadelis avatar Mar 22 '22 20:03 Fadelis