From 11bc3487ab0a9a99de2542f0aa2777c88c7c2198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 1 Aug 2012 15:27:57 +0200 Subject: Remove allow_concurrency as a flag The flag was mainly used to add a Rack::Lock middleware to the stack, but the only scenario the lock is desired is in development. If you are deploying on a not-threaded server, the Rack::Lock does not provide any benefit since you don't have concurrent accesses. On the other hand, if you are on a threaded server, you don't want the lock, since it defeats the purpose of using a threaded server. If there is someone out there, running on a thread server and does want a lock, it can be added to your environment as easy as: `use Rack::Lock` --- railties/test/application/configuration_test.rb | 3 ++- railties/test/application/middleware_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'railties/test') diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index c813defe93..eb808f5473 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -145,7 +145,8 @@ module ApplicationTests RUBY require "#{app_path}/config/application" - assert AppTemplate::Application.config.allow_concurrency + assert AppTemplate::Application.config.cache_classes + assert AppTemplate::Application.config.eager_load end test "initialize a threadsafe app" do diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index 9c9ed0cd6b..34b460d0a7 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -87,8 +87,8 @@ module ApplicationTests assert !middleware.include?("ActiveRecord::QueryCache") end - test "removes lock if allow concurrency is set" do - add_to_config "config.allow_concurrency = true" + test "removes lock if cache classes is set" do + add_to_config "config.cache_classes = true" boot! assert !middleware.include?("Rack::Lock") end -- cgit v1.2.3