summaryrefslogtreecommitdiffstats
path: root/spec/unit/network/http/mongrel.rb
diff options
context:
space:
mode:
authorRick Bradley <rick@rickbradley.com>2008-03-12 22:26:12 -0500
committerLuke Kanies <luke@madstop.com>2008-04-11 13:10:33 -0500
commite86fde2facafd56ee12d7e748b1c8cad916253bf (patch)
tree2d7595566a3f36b5596430c492da3def1b507951 /spec/unit/network/http/mongrel.rb
parentc2f8c69af368a8ba496da4ef0023ac5f0885e3c0 (diff)
downloadpuppet-e86fde2facafd56ee12d7e748b1c8cad916253bf.tar.gz
puppet-e86fde2facafd56ee12d7e748b1c8cad916253bf.tar.xz
puppet-e86fde2facafd56ee12d7e748b1c8cad916253bf.zip
This is the first version where mongrel and webrick are reliably startable and stoppable via Puppet::Network::Server.
Added a network/server integration spec, testing startup, shutdown, reachability, and collision of webrick and mongrel servers in the new network code. Converted Puppet::Network::HTTP::Handler class to a module, as mongrel Handler should be subclassed; converting subclasses to include the module instead. Mongrel will actually stop if you .stop it, graceful_shutdown didn't seem quite so reliable. Webrick requires running in its own Thread to avoid hanging the entire process; this requires introduction of a Mutex to make things safe. We're only supporting the REST protocol. Made this explicit. Fixed http server setup args, w/ specs, ah the glory of integration testing.
Diffstat (limited to 'spec/unit/network/http/mongrel.rb')
-rw-r--r--spec/unit/network/http/mongrel.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/network/http/mongrel.rb b/spec/unit/network/http/mongrel.rb
index a837c9daa..cd23ed9e1 100644
--- a/spec/unit/network/http/mongrel.rb
+++ b/spec/unit/network/http/mongrel.rb
@@ -106,13 +106,13 @@ describe Puppet::Network::HTTP::Mongrel, "when turning off listening" do
it "should order mongrel server to stop" do
@server.listen(@listen_params)
- @mock_mongrel.expects(:graceful_shutdown)
+ @mock_mongrel.expects(:stop)
@server.unlisten
end
it "should not be listening" do
@server.listen(@listen_params)
- @mock_mongrel.stubs(:graceful_shutdown)
+ @mock_mongrel.stubs(:stop)
@server.unlisten
@server.should_not be_listening
end