diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-02-14 11:32:11 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-02-14 20:29:33 +0000 |
commit | 44f4f76d06899b1a0e4719671a4fde3c0851764a (patch) | |
tree | 5c6498d7fe05835066f9e8ece84384654a46a6d5 | |
parent | cfe689f85b0b39d1f3b3e21d9b564d34b2146d88 (diff) | |
download | cmogstored-44f4f76d06899b1a0e4719671a4fde3c0851764a.tar.gz |
DNS lookups cause webrick tests to fail or timeout. Our tests should not have external network dependencies.
-rw-r--r-- | test/http_range.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/http_range.rb b/test/http_range.rb index fe5f0a4..7b0182d 100644 --- a/test/http_range.rb +++ b/test/http_range.rb @@ -5,6 +5,7 @@ require 'test/test_helper' require 'net/http' require 'time' +def Socket.gethostbyname(*args); raise "disabled for test"; end require 'webrick' require 'stringio' @@ -32,6 +33,7 @@ class TestHTTPRange < Test::Unit::TestCase :DocumentRoot => @tmpdir, :ServerType => Thread, :Logger => WEBrick::Log.new(@wblogger), + :DoNotReverseLookup => true, } @webrick = WEBrick::HTTPServer.new(wbopts) @webrick.start |