sql: remove createTestServerParams#143115
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Mar 20, 2025
Merged
Conversation
Member
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes the deprecated function createTestServerParams and updates test configurations to use createTestServerParamsAllowTenants instead, while overriding DefaultTestTenant appropriately for tenant testing. Key changes include:
- Replacing createTestServerParams with createTestServerParamsAllowTenants in TestIndexMutationKVOps.
- Overriding DefaultTestTenant with a tenant-specific function.
- Removing createTestServerParams from server_params_test.go.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/sql/index_mutation_test.go | Updated test configuration to leverage tenant support properly. |
| pkg/sql/server_params_test.go | Removed the deprecated createTestServerParams function. |
Comments suppressed due to low confidence (1)
pkg/sql/index_mutation_test.go:40
- [nitpick] Consider renaming 'TestDoesNotWorkWithSecondaryTenantsButWeDontKnowWhyYet' to a shorter, more descriptive name to improve clarity, as suggested in the PR description.
params.DefaultTestTenant = base.TestDoesNotWorkWithSecondaryTenantsButWeDontKnowWhyYet(143114)
yuzefovich
approved these changes
Mar 19, 2025
Member
yuzefovich
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @shubhamdhama)
The only remaining use of `createTestServerParams` was in `TestIndexMutationKVOps`, but that test is really something the SQL queries team better suited to handle. So, I swapped it out for `createTestServerParamsAllowTenants` and override `DefaultTestTenant` with `TestDoesNotWorkWithSecondaryTenantsButWeDontKnowWhyYet` (tracked in cockroachdb#143114). Now that's taken care of, `createTestServerParams` is fully gone—one less way for test authors to accidentally skip running tests with tenants. Next step: we should rename `createTestServerParamsAllowTenants` back to `createTestServerParams` to keep things tidy. Fixes: cockroachdb#140446 Epic: CRDB-48564 Release note: none
b2944de to
3a789bf
Compare
Contributor
Author
|
Thanks for the review! bors r=yuzefovich |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The only remaining use of
createTestServerParamswas inTestIndexMutationKVOps, but that test is really something the SQL queries team better suited to handle. So, I swapped it out forcreateTestServerParamsAllowTenantsand overrideDefaultTestTenantwith an appropriate one (tracked in #143114).Now that's taken care of,
createTestServerParamsis fully gone—one less way for test authors to accidentally skip running tests with tenants.Next step: we should rename
createTestServerParamsAllowTenantsback tocreateTestServerParamsto keep things tidy.Closes: #140446
Epic: CRDB-48564
Release note: none