Skip to content

Commit

Permalink
roachtest: skip expected error in sqlsmith
Browse files Browse the repository at this point in the history
This commit skips failing `sqlsmith` roachtest because of a known issue
(#40929) in order to avoid unnecessary noise.

Release note: None
  • Loading branch information
yuzefovich committed Mar 22, 2021
1 parent 27b4ab1 commit 8aa000d
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions pkg/cmd/roachtest/sqlsmith.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,20 @@ func registerSQLSmith(r *testRegistry) {
if err != nil {
es := err.Error()
// TODO(yuzefovich): we temporarily ignore internal errors that
// are because of #39433.
if strings.Contains(es, "internal error") && !strings.Contains(es, "internal error: invalid index") {
logStmt(stmt)
t.Fatalf("error: %s\nstmt:\n%s;", err, stmt)
// are because of #39433 and #40929.
var expectedInternalErrors = []string{
"internal error: invalid index",
"could not parse \"0E-2019\" as type decimal",
}
if strings.Contains(es, "internal error") {
var expectedError bool
for _, exp := range expectedInternalErrors {
expectedError = expectedError || strings.Contains(es, exp)
}
if !expectedError {
logStmt(stmt)
t.Fatalf("error: %s\nstmt:\n%s;", err, stmt)
}
} else if strings.Contains(es, "communication error") {
// A communication error can be because
// a non-gateway node has crashed.
Expand Down

0 comments on commit 8aa000d

Please sign in to comment.