Skip to content

Commit 17cba3a

Browse files
committed
roachtest: remove error assertion from panic node mutator
The panic node mutator error assertion is causing flakes, as the error is not always the specific TCP error that is expected even if the panic is working as it should. Given that we are not testing the panic implementation here, asserting on the node being down should be enough. Epic: None Release note: None
1 parent 603ca22 commit 17cba3a

File tree

1 file changed

+0
-11
lines changed
  • pkg/cmd/roachtest/roachtestutil/mixedversion

1 file changed

+0
-11
lines changed

pkg/cmd/roachtest/roachtestutil/mixedversion/steps.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"fmt"
1111
"math"
1212
"math/rand"
13-
"regexp"
1413
"strings"
1514
"time"
1615

@@ -804,8 +803,6 @@ func (s panicNodeStep) Description() string {
804803
return fmt.Sprintf("panicking system interface on node %d", s.targetNode[0])
805804
}
806805

807-
var connectionRefusedRegex = regexp.MustCompile(`dial tcp .*: connect: connection refused`)
808-
809806
func (s panicNodeStep) Run(ctx context.Context, l *logger.Logger, rng *rand.Rand, h *Helper) error {
810807
nodeVersion, err := h.System.NodeVersion(s.targetNode[0])
811808
if err != nil {
@@ -831,14 +828,6 @@ func (s panicNodeStep) Run(ctx context.Context, l *logger.Logger, rng *rand.Rand
831828
return errors.Errorf("expected panic statement to fail, but it succeeded on %s", s.targetNode)
832829
}
833830

834-
isTCPError := connectionRefusedRegex.MatchString(err.Error())
835-
836-
// The expected behavior is that the panic statement will fail with a TCP connection error,
837-
// so any other error is unexpected and should cause the test to fail.
838-
if !isTCPError {
839-
return errors.Wrapf(err, "unexpected error when executing panic statement on %s", s.targetNode)
840-
}
841-
842831
startCtx, cancel := context.WithTimeout(ctx, startTimeout)
843832
defer cancel()
844833

0 commit comments

Comments
 (0)