summaryrefslogtreecommitdiff
path: root/spec/integration/solo/solo_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration/solo/solo_spec.rb')
-rw-r--r--spec/integration/solo/solo_spec.rb17
1 files changed, 11 insertions, 6 deletions
diff --git a/spec/integration/solo/solo_spec.rb b/spec/integration/solo/solo_spec.rb
index efbbde2af9..bfcb74b45c 100644
--- a/spec/integration/solo/solo_spec.rb
+++ b/spec/integration/solo/solo_spec.rb
@@ -133,16 +133,21 @@ EOM
Timeout.timeout(120) do
chef_dir = File.join(File.dirname(__FILE__), "..", "..", "..")
+ threads = []
+
# Instantiate the first chef-solo run
- s1 = Process.spawn("#{chef_solo} -c \"#{path_to('config/solo.rb')}\" -o 'x::default' \
--l debug -L #{path_to('logs/runs.log')}", :chdir => chef_dir)
+ threads << Thread.new do
+ s1 = Process.spawn("#{chef_solo} -c \"#{path_to('config/solo.rb')}\" -o 'x::default' -l debug -L #{path_to('logs/runs.log')}", :chdir => chef_dir)
+ Process.waitpid(s1)
+ end
# Instantiate the second chef-solo run
- s2 = Process.spawn("#{chef_solo} -c \"#{path_to('config/solo.rb')}\" -o 'x::default' \
--l debug -L #{path_to('logs/runs.log')}", :chdir => chef_dir)
+ threads << Thread.new do
+ s2 = Process.spawn("#{chef_solo} -c \"#{path_to('config/solo.rb')}\" -o 'x::default' -l debug -L #{path_to('logs/runs.log')}", :chdir => chef_dir)
+ Process.waitpid(s2)
+ end
- Process.waitpid(s1)
- Process.waitpid(s2)
+ threads.each(&:join)
end
end.not_to raise_error