From 4cba5679d57775f76d4ae5fe99129672099b302f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Fern=C3=A1ndez?= Date: Mon, 6 Nov 2023 16:42:42 +0100 Subject: [PATCH] Wait for 120s before checking jira is up and running --- spec/acceptance/default_parameters_spec.rb | 12 ++++++------ spec/acceptance/mysql_spec.rb | 6 +++--- spec/support/acceptance/constants.rb | 2 ++ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/spec/acceptance/default_parameters_spec.rb b/spec/acceptance/default_parameters_spec.rb index f7f1376f..f03a4e04 100644 --- a/spec/acceptance/default_parameters_spec.rb +++ b/spec/acceptance/default_parameters_spec.rb @@ -49,17 +49,17 @@ class { 'jira': # jira just takes *ages* to start up :-( wget_cmd = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 localhost:8080' apply_manifest(pp, catch_failures: true) - sleep 60 + sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] - sleep 60 + sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] - sleep 60 + sleep SLEEP_SECONDS apply_manifest(pp_upgrade, catch_failures: true) - sleep 60 + sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] - sleep 60 + sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] - sleep 60 + sleep SLEEP_SECONDS apply_manifest(pp_upgrade, catch_failures: true) end diff --git a/spec/acceptance/mysql_spec.rb b/spec/acceptance/mysql_spec.rb index 169a2bfa..b286e299 100644 --- a/spec/acceptance/mysql_spec.rb +++ b/spec/acceptance/mysql_spec.rb @@ -64,11 +64,11 @@ class { 'jira': wget_cmd = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 --no-check-certificate localhost:8081' apply_manifest(pp, catch_failures: true) - sleep 60 + sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] - sleep 60 + sleep SLEEP_SECONDS shell wget_cmd, acceptable_exit_codes: [0, 8] - sleep 60 + sleep SLEEP_SECONDS apply_manifest(pp, catch_changes: true) end diff --git a/spec/support/acceptance/constants.rb b/spec/support/acceptance/constants.rb index 880f217a..d5cf7e86 100644 --- a/spec/support/acceptance/constants.rb +++ b/spec/support/acceptance/constants.rb @@ -16,3 +16,5 @@ FILENAME_DBCONFIG_XML = '/home/jira/dbconfig.xml' FILENAME_CLUSTER_PROPS = '/home/jira/cluster.properties' FILENAME_JIRA_CONFIG_PROPS = '/home/jira/jira-config.properties' + +SLEEP_SECONDS=120