1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Moved port to 4501 for configurator test.

git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@184 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
zedshaw 2006-05-16 04:28:13 +00:00
parent 72caf1dd08
commit 7a8e36a8ca

View file

@ -25,7 +25,7 @@ class ConfiguratorTest < Test::Unit::TestCase
def test_base_handler_config
config = Mongrel::Configurator.new :host => "localhost" do
listener :port => 3111 do
listener :port => 4501 do
# 2 in front should run, but the sentinel shouldn't since dirhandler processes the request
uri "/", :handler => plugin("/handlers/testplugin")
uri "/", :handler => plugin("/handlers/testplugin")
@ -48,19 +48,19 @@ class ConfiguratorTest < Test::Unit::TestCase
assert listener.classifier.uris.include?("/test"), "/test not registered"
end
res = Net::HTTP.get(URI.parse('http://localhost:3111/test'))
res = Net::HTTP.get(URI.parse('http://localhost:4501/test'))
assert res != nil, "Didn't get a response"
assert $test_plugin_fired == 3, "Test filter plugin didn't run 3 times."
res = Net::HTTP.get(URI.parse('http://localhost:3111/'))
res = Net::HTTP.get(URI.parse('http://localhost:4501/'))
assert res != nil, "Didn't get a response"
assert $test_plugin_fired == 6, "Test filter plugin didn't run 6 times."
config.stop
assert_raise Errno::EBADF, Errno::ECONNREFUSED do
res = Net::HTTP.get(URI.parse("http://localhost:3111/"))
res = Net::HTTP.get(URI.parse("http://localhost:4501/"))
end
end