From 4645c99166f415b87ac1bfd01caebdcbeb65d19f Mon Sep 17 00:00:00 2001 From: Dominic Maraglia Date: Fri, 20 May 2011 15:45:57 -0700 Subject: add puppet master polling step for ticket 7117 The test for ticket 7117 producedes spurious failures due to timing: a curl command is executed from an agent to a freshly started Puppet Master; if the Puppet Master is not ready to accept the connection the test will fail. Added an until loop that issues simple curl command to see if the Puppet Master is up and ready --- acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb b/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb index 3f762bcca..79f56c07a 100644 --- a/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb +++ b/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb @@ -17,7 +17,17 @@ on master, "ps -U puppet | awk '/puppet/ { print \$1 }' | xargs kill || echo \"P step "Master: Start Puppet Master" on master, puppet_master("--certdnsnames=\"puppet:$(hostname -s):$(hostname -f)\" --verbose --noop") # allow Master to start and initialize environment -sleep 1 + +step "Verify Puppet Master is ready to accept connections" +host=agents.first +time1 = Time.new +until + on(host, "curl -k https://#{master}:8140") do + sleep 1 + end +time2 = Time.new +elapsed = time2 - time1 +Log.notify "Slept for #{elapsed} seconds waiting for Puppet Master to become ready" -- cgit