diff options
Diffstat (limited to 'spec/unit/application/client_spec.rb')
-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..501251b7fe 100644 --- a/spec/unit/application/client_spec.rb +++ b/spec/unit/application/client_spec.rb @@ -305,7 +305,7 @@ describe Chef::Application::Client, "run_application", :unix_only do allow(Chef::Daemon).to receive(:daemonize).and_return(true) end - it "should exit hard with exitstatus 3" do + it "should exit hard with exitstatus 3", :volatile do pid = fork do @app.run_application 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 |