From 4820142896bf8e31f6a7392fb690e090c3f7881e Mon Sep 17 00:00:00 2001 From: John Sully Date: Mon, 1 Jun 2020 16:13:58 -0400 Subject: [PATCH] PSYNC test shouldn't wait forever Former-commit-id: 130613e16636923296a8d5b2c4bc623e62fef2f5 --- tests/integration/psync2.tcl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/psync2.tcl b/tests/integration/psync2.tcl index df4edf7af..4dfa7cddc 100644 --- a/tests/integration/psync2.tcl +++ b/tests/integration/psync2.tcl @@ -26,12 +26,14 @@ proc show_cluster_status {} { for {set j 0} {$j < 5} {incr j} { set fd [open $R_log($j)] set found 0 - while {[gets $fd l] >= 0 || !$found} { + set tries 0 + while {([gets $fd l] >= 0 || !$found) && $tries < 1000} { if {[regexp $log_regexp $l] && [regexp -nocase $repl_regexp $l]} { lappend log($j) $l set found 1 } + incr $tries } close $fd }