Skip to content

Commit 130613e

Browse files
committed
PSYNC test shouldn't wait forever
1 parent 50fd4fa commit 130613e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/integration/psync2.tcl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ proc show_cluster_status {} {
2626
for {set j 0} {$j < 5} {incr j} {
2727
set fd [open $R_log($j)]
2828
set found 0
29-
while {[gets $fd l] >= 0 || !$found} {
29+
set tries 0
30+
while {([gets $fd l] >= 0 || !$found) && $tries < 1000} {
3031
if {[regexp $log_regexp $l] &&
3132
[regexp -nocase $repl_regexp $l]} {
3233
lappend log($j) $l
3334
set found 1
3435
}
36+
incr $tries
3537
}
3638
close $fd
3739
}

0 commit comments

Comments
 (0)