diff options
author | danielsdeleo <dan@opscode.com> | 2013-10-17 14:05:10 -0700 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2013-10-17 14:05:10 -0700 |
commit | 91d70e8779dfd0511ae719c4f2122995420a900c (patch) | |
tree | bc034794d562f7ef4092123fe061245cb1c9646d /spec/spec_helper.rb | |
parent | b747b23f0fb5c24abd1f83f77dbb23fe9479b593 (diff) | |
download | chef-91d70e8779dfd0511ae719c4f2122995420a900c.tar.gz |
Patch webrick timeout handler to avoid test failures
Webick uses a centralized/synchronized timeout manager. It works by
starting a thread to check for timeouts on an interval. The timeout
checker thread cannot be stopped or canceled in any easy way, and it
makes calls to Time.new, which fail when rspec is in the process of
creating a method stub for that method. Since our tests don't rely on
any timeout behavior enforced by webrick, disable the timeout manager
via a monkey patch.
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f7b8302a52..cb3698548c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -152,3 +152,14 @@ RSpec.configure do |config| Chef::Config.reset end end + +require 'webrick/utils' +module WEBrick + module Utils + class TimeoutHandler + def initialize + @timeout_info = Hash.new + end + end + end +end |