summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJames Mills <prologic@shortcircuit.net.au>2020-05-26 15:58:50 +1000
committerGitHub <noreply@github.com>2020-05-26 15:58:50 +1000
commitcea8a3fcbb3b48fce545d19bce2b5cf920c6794d (patch)
tree79583fb4ac32a9a60664a7b0b0bebd9addd805b5 /tests
parenta20e8f163fde7d64cbc258b6903230dda651adf9 (diff)
Introduce a random sleep in the Netdata updater (#9079)
* Introduce a random sleep in the Netdata updater * Only sleep if we're not a tty (e.g: cron) and use a random interval between 30m-60m * Set lower bound to 1s * Disable random sleep / netdata-updater splay in lifecycle tests
Diffstat (limited to 'tests')
-rwxr-xr-xtests/updater_checks.bats3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/updater_checks.bats b/tests/updater_checks.bats
index 6444c081cc..4f39270776 100755
--- a/tests/updater_checks.bats
+++ b/tests/updater_checks.bats
@@ -56,6 +56,9 @@ setup() {
# Run the updater, with the override so that it uses the local repo we have at hand
# Try to run the installed, if any, otherwise just run the one from the repo
export NETDATA_LOCAL_TARBAL_OVERRIDE="${PWD}"
+ # Disable random sleep / splay for netdata-updater to avoid sampede effect
+ # of many agents (dis|re)connecting too quickly all at onace to Netdata Cloud
+ unset RANDOM; export RANDOM=0
/etc/cron.daily/netdata-updater || ./packaging/installer/netdata-updater.sh
! grep "new_installation" "${ENV}"
}