diff options
author | danielsdeleo <dan@opscode.com> | 2012-11-21 13:49:55 -0800 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2012-11-21 13:49:55 -0800 |
commit | 1846b169438d5599dd1d38a7884987dce5c55a27 (patch) | |
tree | eb2d085e14a487beece3c4b476998899f31471a8 /spec/functional/shell_spec.rb | |
parent | 4b9087e1916a6a0593de6fef6c5501acd8ad361e (diff) | |
download | chef-1846b169438d5599dd1d38a7884987dce5c55a27.tar.gz |
break out of read loop after timeout
Diffstat (limited to 'spec/functional/shell_spec.rb')
-rw-r--r-- | spec/functional/shell_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/functional/shell_spec.rb b/spec/functional/shell_spec.rb index 82b79b279d..e202940e68 100644 --- a/spec/functional/shell_spec.rb +++ b/spec/functional/shell_spec.rb @@ -34,9 +34,10 @@ describe Chef::Shell do buffer << io.read_nonblock(10) rescue Errno::EWOULDBLOCK, Errno::EAGAIN, Errno::EIO end - if Time.new - start > 15 - STDERR.puts "did not read expected value `#{expected_value}' within 15s" + if Time.new - start > 30 + STDERR.puts "did not read expected value `#{expected_value}' within 30s" STDERR.puts "Buffer so far: #{buffer}" + break end end buffer |