mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Valery Kharseko
23 hours ago c4d91fab9e005179803a3ab978e8f2896a5a5b16
.github/scripts/replication/monitor.sh
@@ -71,10 +71,10 @@
MONITORING_PERIOD=60
# Three converged samples in a row, the last one started more than a monitoring period (and
# the publisher's 5 s latch) after the first ended. Sets CONVERGED_IN to the seconds until the
# first of them
wait_converged() {
  local start=$SECONDS hits=0 first= last=
# the publisher's 5 s latch) after the first ended. Sets CONVERGED_IN to the seconds from
# <start> (a value of SECONDS, now by default) until the first of them
wait_converged() { # [<start>]
  local start=${1:-$SECONDS} hits=0 first= last=
  until [ $hits -ge 3 ] && [ $((last - first)) -gt $((MONITORING_PERIOD + 5)) ]; do
    last=$SECONDS
    if converged_once; then hits=$((hits + 1)); first=${first:-$SECONDS}; else hits=0; first=; fi