8000 server: restore auto-generated RPC mock tests once gomock has support for generics · Issue #147193 · cockroachdb/cockroach · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

server: restore auto-generated RPC mock tests once gomock has support for generics #147193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cthumuluru-crdb opened this issue May 23, 2025 · 0 comments
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-db-server

Comments

@cthumuluru-crdb
Copy link
Contributor
cthumuluru-crdb commented May 23, 2025

Tests in pkg/rpc/mocks_generated_test.go are auto generated using gomock.

gomock(
name = "mock_rpc",
out = "mocks_generated_test.go",
interfaces = [
"BatchStreamClient",
"Dialbacker",
],
library = ":rpc",
package = "rpc",
self_package = "github.com/cockroachdb/cockroach/pkg/rpc",
visibility = [
":__pkg__",
"//pkg/gen:__pkg__",
],
)
and
":mock_rpc", # keep
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 #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

@cthumuluru-crdb cthumuluru-crdb added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-db-server labels May 23, 2025
< 582E div class="TimelineItem-badge">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-db-server
Projects
None yet
Development

No branches or pull requests

1 participant
0