diff options
author | danielsdeleo <dan@opscode.com> | 2013-10-17 14:19:59 -0700 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2013-10-17 14:19:59 -0700 |
commit | 166a44e6af111cf01a145395479a7738b96035d2 (patch) | |
tree | 6e54a558dbdd274648ed426c57214a80109a0e39 /spec/spec_helper.rb | |
parent | 91d70e8779dfd0511ae719c4f2122995420a900c (diff) | |
download | chef-166a44e6af111cf01a145395479a7738b96035d2.tar.gz |
Document webrick duck punch
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index cb3698548c..618f782c7c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -154,6 +154,20 @@ RSpec.configure do |config| end require 'webrick/utils' + +# Webrick 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. +# +# Hopefully this fails loudly if the webrick code should change. As of this +# writing, the relevant code is in webrick/utils, which can be located on +# your system with: +# +# $ gem which webrick/utils module WEBrick module Utils class TimeoutHandler |