Skip to content

Commit

Permalink
testutils: Use correct context in ExpectErrWithTimeout
Browse files Browse the repository at this point in the history
Use correct context in ExpectErrWithTimeout.

Epic: None
Release note: None
  • Loading branch information
Yevgeniy Miretskiy committed Sep 18, 2023
1 parent f9a720d commit fc5988d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/testutils/sqlutils/sql_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (sr *SQLRunner) ExpectErrWithTimeout(
d = testutils.DefaultSucceedsSoonDuration
}
_ = timeutil.RunWithTimeout(context.Background(), "expect-err", d, func(ctx context.Context) error {
_, err := sr.DB.ExecContext(context.Background(), query, args...)
_, err := sr.DB.ExecContext(ctx, query, args...)
if !testutils.IsError(err, errRE) {
return errors.Newf("expected error '%s', got: %s", errRE, pgerror.FullError(err))
}
Expand Down

0 comments on commit fc5988d

Please sign in to comment.