From: Dominic Maraglia <[email protected]>

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

Signed-off-by: Dominic Maraglia <[email protected]>
---
Local-branch: tests/2.7.x/7117
 .../ticket_7117_broke_env_criteria_authconf.rb     |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb 
b/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb
index 3f762bc..79f56c0 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"
 
 
 
-- 
1.7.3.5

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to