Skip to content

Commit e02ff28

Browse files
committed
sql: fix TestListProfilerExecutionDetails
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
1 parent 94db609 commit e02ff28

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)