diff options
author | danielsdeleo <dan@opscode.com> | 2013-04-24 13:04:37 -0700 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2013-04-24 13:30:11 -0700 |
commit | 9f52aed674679ed354d17c4041d5cbb8fc684438 (patch) | |
tree | f91fc31a475ba19c883196484777147122199a72 | |
parent | 09801cfb01a6e0303381c3c1c002b2da1ae37595 (diff) | |
download | chef-9f52aed674679ed354d17c4041d5cbb8fc684438.tar.gz |
add failsafes to diagnose test failures
-rw-r--r-- | chef/spec/unit/application/client_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chef/spec/unit/application/client_spec.rb b/chef/spec/unit/application/client_spec.rb index d7beb7e98d..bc36d8df28 100644 --- a/chef/spec/unit/application/client_spec.rb +++ b/chef/spec/unit/application/client_spec.rb @@ -148,8 +148,17 @@ describe Chef::Application::Client, "run_application", :unix_only do it "should exit gracefully when sent SIGTERM" do pid = fork do - @app.run_application + begin + @app.run_application + rescue SystemExit # expected + rescue Exception => e + $stderr.puts e + $stderr.puts e.backtrace + ensure + exit! + end end + IO.select([@pipe[0]], nil, nil, 10).should_not be_nil @pipe[0].gets.should == "started\n" Process.kill("TERM", pid) Process.wait |