Originally raised in this comment by @thiagodpf.
What?
The current unit tests run the server and clients in the same process.
gRPC seems to have a global registry for types, so once the server loads them, the client doesn't need to.
This means that all tests that test that clients actually manage to load types correctly only with .proto files are not actually testing that :(
Solutions:
Preferably go test ./... should run the unit tests with the server and client as separate process - preferably even separate from the main go test one 🤔
This sounds involved.
A quicker solution will be to have another CI step that runs a server + k6 run script.js exercising the most common cases.
Both will be best.
Originally raised in this comment by @thiagodpf.
What?
The current unit tests run the server and clients in the same process.
gRPC seems to have a global registry for types, so once the server loads them, the client doesn't need to.
This means that all tests that test that clients actually manage to load types correctly only with
.protofiles are not actually testing that :(Solutions:
Preferably
go test ./...should run the unit tests with the server and client as separate process - preferably even separate from the maingo testone 🤔This sounds involved.
A quicker solution will be to have another CI step that runs a server +
k6 run script.jsexercising the most common cases.Both will be best.