summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-09-02 12:49:40 -0700
committerGitHub <noreply@github.com>2016-09-02 12:49:40 -0700
commit57211cbf033d5fa7cbc8aa62f93e45ceb7d58a74 (patch)
tree79bf21fff8ecc466a4acc812e2fcaddb735b6cc8
parent521437bad196d5403cf3b895b84a77dc7147572b (diff)
parent2d1f789054e9c49ae205fc5792bd61fb2a09de70 (diff)
downloadchef-57211cbf033d5fa7cbc8aa62f93e45ceb7d58a74.tar.gz
Merge pull request #5276 from chef/lcg/solo-test-loop-tweaking
tweak chef-solo run_lock timing test
-rw-r--r--spec/integration/solo/solo_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/integration/solo/solo_spec.rb b/spec/integration/solo/solo_spec.rb
index c4a7ca44ce..efbbde2af9 100644
--- a/spec/integration/solo/solo_spec.rb
+++ b/spec/integration/solo/solo_spec.rb
@@ -115,7 +115,7 @@ ruby_block "sleeping" do
retries = 200
while IO.read(Chef::Config[:log_location]) !~ /Chef client [0-9]+ is running, will wait for it to finish and then run./
sleep 0.1
- last if ( retries -= 1 ) <= 0
+ raise "we ran out of retries" if ( retries -= 1 ) <= 0
end
end
end
@@ -151,11 +151,11 @@ EOM
# checks in one example.
run_log = File.read(path_to("logs/runs.log"))
- # both of the runs should succeed
- expect(run_log.lines.reject { |l| !l.include? "INFO: Chef Run complete in" }.length).to eq(2)
-
# second run should have a message which indicates it's waiting for the first run
expect(run_log).to match(/Chef client [0-9]+ is running, will wait for it to finish and then run./)
+
+ # both of the runs should succeed
+ expect(run_log.lines.reject { |l| !l.include? "INFO: Chef Run complete in" }.length).to eq(2)
end
end