You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many things that I can do with WireMockServer are missing here, such as the ability to add a delay.
Now, I could do a PR to just add that feature to the dsl by adding it to the GrpcStubMappingBuilder or GrpcResponseDefinitionBuilder class, but that would seem to duplicate much of what is in the core ResponseDefinitionBuilder class.
One solution I played around with was introducing functional callbacks. It would make this nice and easy, but the dsl would have a slight difference in usage from the core WireMock dsl.
Something like this in WireMockGrpcService (I have some other local changes in GrpcStubMappingBuilder to make this work):
Proposal
Many things that I can do with
WireMockServer
are missing here, such as the ability to add a delay.Now, I could do a PR to just add that feature to the dsl by adding it to the
GrpcStubMappingBuilder
orGrpcResponseDefinitionBuilder
class, but that would seem to duplicate much of what is in the coreResponseDefinitionBuilder
class.There should be a way to expose this. Currently, if you look at https://github.com/wiremock/wiremock-grpc-extension/blob/main/src/main/java/org/wiremock/grpc/dsl/GrpcStubMappingBuilder.java#L64 you can see that
responseBuilder.build
is buried a few layers deep.This needs to be exposed somewhere so that you can pass it's result into
WireMockGrpcService.stubFor
.Ideally we should be able to do something like this:
References
No response
The text was updated successfully, but these errors were encountered: