summaryrefslogtreecommitdiff
path: root/test/net/http/utils.rb
diff options
context:
space:
mode:
-rw-r--r--test/net/http/utils.rb19
1 files changed, 16 insertions, 3 deletions
@@ -1,4 +1,9 @@
require 'webrick'
require 'webrick/httpservlet/abstract'
module TestNetHTTPUtils
@@ -35,14 +40,22 @@ module TestNetHTTPUtils
end
def spawn_server
- @server = WEBrick::HTTPServer.new(
:BindAddress => config('host'),
:Port => config('port'),
:Logger => WEBrick::Log.new(NullWriter.new),
:AccessLog => [],
:ShutdownSocketWithoutClose => true,
- :ServerType => Thread
- )
@server.mount('/', Servlet)
@server.start
n_try_max = 5