connectrpc / connect-go

The Go implementation of Connect: Protobuf RPC that works.
https://connectrpc.com
Apache License 2.0
2.76k stars 91 forks source link

Doesn't work with mocked HTTP client #666

Closed a-porubai closed 6 months ago

a-porubai commented 6 months ago

Describe the bug

Hello! I try to use mocked HTTP client for testing. After request to grpc client and it blocks and I don't get a response or error

To Reproduce

pass custom HTTP client to grpc client: func (g *GrpcClientProvider) AccountingInternal() internal_apiv1connect.AccountingInternalServiceClient { return internal_apiv1connect.NewAccountingInternalServiceClient(g.builder.httpClient, g.builder.accountingInternalUrl, g.GetClientOptions()...) }

emcfarlane commented 6 months ago

Hello @a-porubai ! Could you please provide more details about the mocked client and a full reproducible example to run? The client must obey the Do behaviour, please see the docs. We might be able to help debug the mocked client in the buf slack room.

emcfarlane commented 6 months ago

https://bufbuild.slack.com/archives/CRZ680FUH/p1704205957554459