Skip to content
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

bazel: consider better patterns for mock generation #67010

Closed
erikgrinaker opened this issue Jun 29, 2021 · 3 comments · Fixed by #67226
Closed

bazel: consider better patterns for mock generation #67010

erikgrinaker opened this issue Jun 29, 2021 · 3 comments · Fixed by #67226
Labels
A-testing Testing tools and infrastructure C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.

Comments

@erikgrinaker
Copy link
Contributor

In #66910 I added a bunch of interface mocks using gomock/mockgen. The Bazel build integration got a bit messy because of dependency handling, we should revisit this and come up with a best practice pattern for generating mocks.

/cc @cockroachdb/dev-inf @irfansharif

@erikgrinaker erikgrinaker added C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. A-testing Testing tools and infrastructure labels Jun 29, 2021
@erikgrinaker
Copy link
Contributor Author

@irfansharif I might look into this during flex week, want to team up on this?

@irfansharif
Copy link
Contributor

yea, let's do it. Would be great to iron out precedence if we're looking to continue lean on mocks.

@erikgrinaker
Copy link
Contributor Author

Yeah, I'd like to push for using mocks way more that we do now -- we tend to use integration tests when mocked unit tests would be faster, more comprehensive, and more reliable.

irfansharif added a commit to irfansharif/cockroach that referenced this issue Jul 6, 2021
Fixes cockroachdb#67010. Also clean up some rotted gomock generation in sqlproxyccl
(mockgen usage was removed in cockroachdb#66369).

Release note: None
irfansharif added a commit to irfansharif/cockroach that referenced this issue Jul 8, 2021
Fixes cockroachdb#67010. Also clean up some rotted gomock generation in sqlproxyccl
(mockgen usage was removed in cockroachdb#66369).

Release note: None
craig bot pushed a commit that referenced this issue Jul 19, 2021
67226: range{feed,client},roachpb: standardize mock generation through bazel r=irfansharif a=irfansharif

Fixes #67010. Also clean up some rotted gomock generation in sqlproxyccl
(mockgen usage was removed in #66369).

Release note: None

67478: backupccl: fix settings registry leak during restore r=pbardea a=pbardea

Previously, every time a restore data processor was created, a callback
was added to the settings registry to update the size of the pool. This
could potentially lead to a large growth in registered callbacks that
close over the processors created.

This commit replaces that mechanism with a background poller that polls
the cluster setting every 30 seconds to see if the worker pool needs
updating.

Release note (bug fix): Fix a minor resource leak that occurs when a
RESTORE is run.

Co-authored-by: irfan sharif <[email protected]>
Co-authored-by: Paul Bardea <[email protected]>
@craig craig bot closed this as completed in 37d82fb Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing Testing tools and infrastructure C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants