release-22.2: pkg/ccl: Unskip TestTenantStatusAPI/tenant_ranges/pagination #106632
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.
Backport commits from #106631 and #99054
Fixes: #92979
Previously, in #97386, we skipped test_tenant_ranges_pagination because it was marked as flaky.
The test makes a request for a single range and expects an offset of
1
back. It then uses this offset to request a second range, and expects an offset of2
. This means that the test requires at least 3 ranges to exist on the tenant.The test was flaking on the assertion that the offset returned by the second request came back as
2
. Instead, it was flaking when the offset came back as0
, which signifies that there are no more ranges to process.We learned that the tenant create process has an asycnhronous splitting of ranges that occurs, which is what would lead to this sporadic scenario where not enough ranges existed (yet) for the test to succeed.
This patch updates the test with a
testutils.SucceedsSoon
clause that checks first thatcrdb_internal.ranges
contains at least 3 ranges, prior to making the second request. This should provide sufficient time for the range split queue to be processed and eliminate the vast majority of these test flakes.Release note: none
Release justification: flake test fix