sql: unskip TestWriteResumeSpan, TestDropDatabaseDeleteData, TestAbortedTxnLocks, and TestBackfillQueryWithProtectedTS for mulitenant#160528
Merged
craig[bot] merged 4 commits intocockroachdb:masterfrom Jan 6, 2026
Conversation
Previously, TestWriteResumeSpan used raw key literals like
roachpb.Key("a") without tenant prefixes.
This commit adds a makeKey helper function that prepends the tenant
prefix to keys, following the same pattern already used in
TestResumeSpanSSTManifestRoundTrip.
Part of: cockroachdb#156127
Release note: None
Member
The test was failing with a "sync: negative WaitGroup counter" panic when running with COCKROACH_TEST_TENANT=true. This happened because the OnWatchForZoneConfigUpdatesEstablished callback was being invoked multiple times (once for the system tenant and once for the test tenant), causing zoneCfgRangeFeedStarted.Done() to be called more than once on a WaitGroup that only had Add(1). The fix uses sync.Once to ensure Done() is only called once, regardless of how many times the callback is invoked. part of: cockroachdb#156127 Release note: None
This passed without any other changes. Release note: None
…tenants The test was failing with tenants because `crdb_internal.kv_enqueue_replica` is not supported in virtual clusters. The fix queries range IDs from the tenant connection (since the table is in the tenant), then executes `kv_enqueue_replica` through the system layer connection, matching the pattern already used in `TestValidationWithProtectedTS` in the same file. Informs: cockroachdb#156127 Release note: None
fqazi
approved these changes
Jan 6, 2026
Collaborator
fqazi
left a comment
There was a problem hiding this comment.
@rafiss Nice work!
@fqazi reviewed 4 files and all commit messages, and made 1 comment.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @michae2).
Collaborator
Author
|
bors r+ |
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.
rowexec: fix TestWriteResumeSpan to work with external test tenants #160528
Previously, TestWriteResumeSpan used raw key literals like roachpb.Key("a") without tenant prefixes.
This commit adds a makeKey helper function that prepends the tenant prefix to keys, following the same pattern already used in TestResumeSpanSSTManifestRoundTrip.
sql: fix TestDropDatabaseDeleteData to work with external test tenants
The test was failing with a "sync: negative WaitGroup counter" panic
when running with COCKROACH_TEST_TENANT=true. This happened because the
OnWatchForZoneConfigUpdatesEstablished callback was being invoked
multiple times (once for the system tenant and once for the test
tenant), causing zoneCfgRangeFeedStarted.Done() to be called more than
once on a WaitGroup that only had Add(1).
The fix uses sync.Once to ensure Done() is only called once, regardless
of how many times the callback is invoked.
sql: unskip TestAbortedTxnLocks for tenants
This passed without any other changes.
sql: fix TestBackfillQueryWithProtectedTS to work with external test tenants
The test was failing with tenants because
crdb_internal.kv_enqueue_replicais not supported in virtual clusters. The fix queries range IDs from the
tenant connection (since the table is in the tenant), then executes
kv_enqueue_replicathrough the system layer connection, matching thepattern already used in
TestValidationWithProtectedTSin the same file.fixes #156127
Release note: None