Skip to content

Commit 15d96ec

Browse files
authored
chore(ci): Handle exit code 143 during reset within docker based clusters (#2603)
* chore(ci): Handle exit code 143 during reset within docker based clusters
1 parent adab661 commit 15d96ec

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

e2e/cluster/docker/cluster.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"os"
77
"os/exec"
8+
"strings"
89
"sync"
910
"testing"
1011
"time"
@@ -102,7 +103,15 @@ func (c *Cluster) Destroy() {
102103
}
103104

104105
func (c *Cluster) RunCommandOnNode(node int, line []string, envs ...map[string]string) (string, string, error) {
105-
return c.Nodes[node].Exec(line, envs...)
106+
stdout, stderr, err := c.Nodes[node].Exec(line, envs...)
107+
if err != nil {
108+
// check if this is a reset-installation command that resulted in exit code 143
109+
// as this is expected behavior when the node reboots and the connection is lost
110+
if strings.Contains(err.Error(), "143") && strings.Contains(strings.Join(line, " "), "reset-installation") {
111+
return stdout, stderr, nil
112+
}
113+
}
114+
return stdout, stderr, err
106115
}
107116

108117
func (c *Cluster) SetupPlaywrightAndRunTest(testName string, args ...string) (string, string, error) {

0 commit comments

Comments
 (0)