Sha256: 75623b1e097b74326712d91d3d8f0999a41b330b4afbd041ac677d5bdaf26112

Contents?: true

Size: 844 Bytes

Versions: 27

Compression:

Stored size: 844 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
require 'ruby/shared/abstract_server_spec'

module PhusionPassenger

shared_examples_for "a spawn server" do
	it "raises an AbstractServer::ServerError if the server was killed" do
		spawner   # Start the spawn server.
		Process.kill('SIGKILL', spawner.server_pid)
		spawning = lambda { spawn_some_application }
		spawning.should raise_error(AbstractServer::ServerError)
	end
	
	it "works correctly after a restart, if something went wrong" do
		filename = "#{Utils.passenger_tmpdir}/works.txt"
		before_start %Q{
			File.touch(#{filename.inspect})
		}
		spawner   # Start the spawn server.
		Process.kill('SIGKILL', spawner.server_pid)
		spawner.stop
		spawner.start
		spawn_some_application
		File.exist?(filename).should be_true
	end
end

end # module PhusionPassenger

Version data entries

27 entries across 27 versions & 4 rubygems

Version Path
passenger-3.0.21 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.19 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.18 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.17 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.15 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.14 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.13 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.12 test/ruby/shared/spawners/spawn_server_spec.rb
yspassenger-3.0.12 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.11 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.10 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.9 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.8 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.7 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.6 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.5 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.4 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.3 test/ruby/shared/spawners/spawn_server_spec.rb
railsware-passenger-3.0.2.1 test/ruby/shared/spawners/spawn_server_spec.rb
passenger-3.0.2 test/ruby/shared/spawners/spawn_server_spec.rb