summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-02-26 20:40:21 -0800
committerJay Mundrawala <jdmundrawala@gmail.com>2015-02-26 20:40:21 -0800
commitebad0fd6a6af04df1a7cc561e4c63958f9171c3c (patch)
treefaf3299d64e5448a4356cccb842746b2f962801d
parent33e5f7249a0f075b861e4fccf1ad3228f93fd26f (diff)
downloadchef-ebad0fd6a6af04df1a7cc561e4c63958f9171c3c.tar.gz
Updated windows_service_spec to expect the timeout
-rw-r--r--spec/unit/windows_service_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/windows_service_spec.rb b/spec/unit/windows_service_spec.rb
index cf933a9ab2..6596529937 100644
--- a/spec/unit/windows_service_spec.rb
+++ b/spec/unit/windows_service_spec.rb
@@ -39,7 +39,7 @@ describe "Chef::Application::WindowsService", :windows_only do
allow(instance).to receive(:state).and_return(4)
instance.service_main
end
- it "passes config params to new process" do
+ it "passes config params to new process with a default timeout of 1200 seconds (20 minutes)" do
Chef::Config.merge!({:log_location => tempfile.path, :config_file => "test_config_file", :log_level => :info})
expect(instance).to receive(:configure_chef).twice
instance.service_init
@@ -47,7 +47,7 @@ describe "Chef::Application::WindowsService", :windows_only do
allow(instance.instance_variable_get(:@service_signal)).to receive(:wait)
allow(instance).to receive(:state).and_return(4)
expect(instance).to receive(:run_chef_client).and_call_original
- expect(instance).to receive(:shell_out).with("chef-client --no-fork -c test_config_file -L #{tempfile.path}").and_return(shell_out_result)
+ expect(instance).to receive(:shell_out).with("chef-client --no-fork -c test_config_file -L #{tempfile.path}", {:timeout => 1200}).and_return(shell_out_result)
instance.service_main
tempfile.unlink
end