summaryrefslogtreecommitdiff
path: root/test/xmlrpc
diff options
context:
space:
mode:
Diffstat (limited to 'test/xmlrpc')
-rw-r--r--test/xmlrpc/webrick_testing.rb21
1 files changed, 9 insertions, 12 deletions
diff --git a/test/xmlrpc/webrick_testing.rb b/test/xmlrpc/webrick_testing.rb
index c2a3003946..c72895a9d1 100644
--- a/test/xmlrpc/webrick_testing.rb
+++ b/test/xmlrpc/webrick_testing.rb
@@ -11,15 +11,16 @@ module WEBrick_Testing
raise "already started" if defined?(@__server) && @__server
@__started = false
+ @__server = WEBrick::HTTPServer.new(
+ {
+ :BindAddress => "localhost",
+ :Logger => DummyLog.new,
+ :AccessLog => [],
+ }.update(config))
+ yield @__server
+ @__started = true
+
@__server_thread = Thread.new {
- @__server = WEBrick::HTTPServer.new(
- {
- :BindAddress => "localhost",
- :Logger => DummyLog.new,
- :AccessLog => [],
- :StartCallback => proc { @__started = true }
- }.update(config))
- yield @__server
begin
@__server.start
rescue IOError => e
@@ -28,10 +29,6 @@ module WEBrick_Testing
@__started = false
end
}
-
- Timeout.timeout(5) {
- Thread.pass until @__started # wait until the server is ready
- }
end
def stop_server