Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roachtest: fail tpcdsvec test with an error #47974

Merged
merged 1 commit into from
Apr 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pkg/cmd/roachtest/tpcdsvec.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/cmd/cmpconn"
"github.com/cockroachdb/cockroach/pkg/util/timeutil"
"github.com/cockroachdb/cockroach/pkg/workload/tpcds"
"github.com/cockroachdb/errors"
)

func registerTPCDSVec(r *testRegistry) {
Expand Down Expand Up @@ -149,7 +150,7 @@ func registerTPCDSVec(r *testRegistry) {
}

noStatsRunTimes := make(map[int]float64)
encounteredErrors := false
var errToReport error
// We will run all queries in two scenarios: without stats and with
// auto stats. The idea is that the plans are likely to be different,
// so we will be testing different execution scenarios. We additionally
Expand All @@ -175,7 +176,7 @@ func registerTPCDSVec(r *testRegistry) {
ctx, 3*timeout, conns, "", query, false, /* ignoreSQLErrors */
); err != nil {
t.Status(fmt.Sprintf("encountered an error: %s\n", err))
encounteredErrors = true
errToReport = errors.CombineErrors(errToReport, err)
} else {
runTimeInSeconds := timeutil.Since(start).Seconds()
t.Status(
Expand All @@ -198,8 +199,8 @@ func registerTPCDSVec(r *testRegistry) {
createStatsFromTables(t, clusterConn, tpcdsTables)
}
}
if encounteredErrors {
t.FailNow()
if errToReport != nil {
t.Fatal(errToReport)
}
}

Expand Down