cockroachdb / cockroachdb/cockroach
server: restore auto-generated RPC mock tests once gomock has support for generics
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Tests in `pkg/rpc/mocks_generated_test.go` are auto generated using gomock. https://github.com/cockroachdb/cockroach/blob/cb9aa6e26818595037d719c028117f4927c6ab58/pkg/rpc/BUILD.bazel#L103-L117 and https://github.com/cockroachdb/cockroach/blob/cb9aa6e26818595037d719c028117f4927c6ab58/pkg/rpc/BUILD.bazel#L137 are the Bazel actions that generate the mock tests.
As part of adding support for DRPC, `Connection` and `Peer` functionality is refactored to use generics in https://github.com/cockroachdb/cockroach/pull/146984. This broke the generated mock tests as gomock lacks support for generics. To workaround the problem auto-generated mock tests are replaced with regular tests.
This ticket is a tracking ticket to re-enable mock generated tests once `gomock` has support for generics.
Jira issue: CRDB-50916
Contributor guide
Assessment
This issue has not been assessed yet.