Skip to content

Commit 7c38217

Browse files
craig[bot]shubhamdhama
craig[bot]
andcommitted
Merge #143113
143113: sql: fix TestListProfilerExecutionDetails r=yuzefovich a=shubhamdhama In #142391, a bug was introduced in the test where `testutils.SucceedSoon`'s closure used `require.Len` instead of returning an error, causing the test to fail if slice length doesn't match without retrying. This assertion has been reverted to the `if` statement that returns an error instead. Fixes: #143082 Release note: none Epic: none Co-authored-by: Shubham Dhama <[email protected]>
2 parents 8c96475 + e02ff28 commit 7c38217

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/sql/jobs_profiler_execution_details_test.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,9 @@ func TestListProfilerExecutionDetails(t *testing.T) {
399399
if s.DeploymentMode().IsExternal() {
400400
expectedCount--
401401
}
402-
require.Len(t, files, expectedCount)
402+
if len(files) != expectedCount {
403+
return errors.Newf("expected %d files, got %d: %v", expectedCount, len(files), files)
404+
}
403405
return nil
404406
})
405407

@@ -418,7 +420,9 @@ func TestListProfilerExecutionDetails(t *testing.T) {
418420
if s.DeploymentMode().IsExternal() {
419421
expectedCount = 8
420422
}
421-
require.Len(t, files, expectedCount)
423+
if len(files) != expectedCount {
424+
return errors.Newf("expected %d files, got %d: %v", expectedCount, len(files), files)
425+
}
422426
return nil
423427
})
424428
patterns = []string{

0 commit comments

Comments
 (0)