Skip to content

Commit

Permalink
roachtest: fix error depth
Browse files Browse the repository at this point in the history
Errors were reported like this:

> (test_impl.go:291).Fatal: pq: invalid syntax @1

but that line is the impl of `Fatal`. We want to walk up one more frame.

Epic: none
Release note: None
  • Loading branch information
tbg authored and Miral Gadani committed Jan 18, 2023
1 parent ddbfcd3 commit f7c1cce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cmd/roachtest/test_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ func (t *testImpl) addFailure(format string, args ...interface{}) {
if format == "" {
format = strings.Repeat(" %v", len(args))[1:]
}
reportFailure := newFailure(errors.NewWithDepthf(1, format, args...), collectErrors(args))
reportFailure := newFailure(errors.NewWithDepthf(2, format, args...), collectErrors(args))

t.mu.Lock()
defer t.mu.Unlock()
Expand Down

0 comments on commit f7c1cce

Please sign in to comment.