Skip to content

Commit db17aa7

Browse files
committed
stop command runner
1 parent f0adb97 commit db17aa7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

maintnotifications/e2e/command_runner_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package e2e
33
import (
44
"context"
55
"fmt"
6+
"strings"
67
"sync"
78
"sync/atomic"
89
"time"
@@ -88,6 +89,15 @@ func (cr *CommandRunner) FireCommandsUntilStop(ctx context.Context) {
8889

8990
cr.operationCount.Add(1)
9091
if err != nil {
92+
if err == redis.ErrClosed || strings.Contains(err.Error(), "client is closed") {
93+
select {
94+
case <-cr.stopCh:
95+
return
96+
default:
97+
}
98+
return
99+
}
100+
91101
fmt.Printf("Error: %v\n", err)
92102
cr.errorCount.Add(1)
93103

0 commit comments

Comments
 (0)