diff options
author | tyler-ball <tyleraball@gmail.com> | 2015-03-06 07:29:59 -0800 |
---|---|---|
committer | tyler-ball <tyleraball@gmail.com> | 2015-03-10 09:10:48 -0700 |
commit | 0046aaca756391dedaa8255326cab9fcbc050ab8 (patch) | |
tree | 3fd3c657a8bbc067066f3a2e6d43a4e3659a446b /spec/unit/application | |
parent | 4b0f63b90cc72365fccd3f4f2e07721de7af80e6 (diff) | |
download | chef-0046aaca756391dedaa8255326cab9fcbc050ab8.tar.gz |
Nightlies on debian and el6 have been failing on these timing-based tests, doing a quick fix
Diffstat (limited to 'spec/unit/application')
-rw-r--r-- | spec/unit/application/client_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/application/client_spec.rb b/spec/unit/application/client_spec.rb index ea2ad473e5..730b021dfb 100644 --- a/spec/unit/application/client_spec.rb +++ b/spec/unit/application/client_spec.rb @@ -293,7 +293,7 @@ describe Chef::Application::Client, "run_application", :unix_only do allow(Chef::Client).to receive(:new).and_return(@client) allow(@client).to receive(:run) do @pipe[1].puts 'started' - sleep 1 + sleep 6 @pipe[1].puts 'finished' end end @@ -320,9 +320,9 @@ describe Chef::Application::Client, "run_application", :unix_only do end expect(@pipe[0].gets).to eq("started\n") Process.kill("TERM", pid) - Process.wait - sleep 1 # Make sure we give the converging child process enough time to finish - expect(IO.select([@pipe[0]], nil, nil, 0)).not_to be_nil + Process.wait(pid) + # The timeout value needs to be large enough for the child process to finish + expect(IO.select([@pipe[0]], nil, nil, 15)).not_to be_nil expect(@pipe[0].gets).to eq("finished\n") end end |