release-24.1: kv: fix assertion in TestProxyTracing #133621
Merged
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 1/1 commits from #133609 on behalf of @nvanbenschoten.
/cc @cockroachdb/release
This commit fixes the assertion in
TestProxyTracing
so that the test will fail if request proxying is not working as expected. The test was fooling itself, expectingQueryRowContext
to return a nilRow
if no matching trace event was found. This is not the case, as a nilRow
is never returned. Instead,Row.Scan
returnsErrNoRows
if no matching row is found.Also, the query wasn't even running because it was passing the last line of the query string in as a parameter, leading to the error:
"pq: got 1 parameters but the statement requires 0"
.I confirmed that before this change, the test passes even with request proxying disabled. After this change, the test fails.
Epic: None
Release note: None
Release justification: testing only