https://linen.dev logo
#help
Title
# help
a

Alejandro Lorefice

10/06/2023, 4:25 PM
Hello! I’ve been trying to use wiremock-grpc-extension to test a service with a couple of basic unary RPC’s but it seems like it doesn’t support imported messages. It fails with both well-known messages like Empty or Timestamp but also with messages from within the same project. You can validate this by adding any imported message on the demo proto and running the tests. For example: Importing empty
Copy code
import "google/protobuf/empty.proto";
and adding an RPC sending and receiving empty messages:
Copy code
rpc greetNothing(google.protobuf.Empty) returns (google.protobuf.Empty);
This will throw a runtime exception:
Copy code
com.google.protobuf.Descriptors$DescriptorValidationException: com.example.grpc.GreetingService.greetNothing: ".google.protobuf.Empty" is not defined.
I’ve tried adding
task.descriptorSetOptions.includeImports = true
on the gradle protobuf configuration but it throws the same results 🤔 Anyone came across the same? Any hint?
t

Tom

10/09/2023, 8:32 AM
Hi @Alejandro Lorefice this is a very new extension so it still has some rough edges. Would you mind opening a GitHub issue with the details of how to reproduce this? If you could share a minimal reproducer project that would be ideal.
👌 1
a

Alejandro Lorefice

10/11/2023, 7:17 AM
Done: https://github.com/wiremock/wiremock-grpc-extension/issues/7. Let me know if I've missed something. 🙏
t

Tom

10/11/2023, 7:17 AM
Thanks!
Fixed and released in 0.2.0
🙌 1
a

Alejandro Lorefice

10/11/2023, 3:37 PM
Thank you Tom! I totally missed that parameter 🤦‍♂️
t

Tom

10/11/2023, 3:38 PM
No worries, I didn’t know about it either until I started digging