1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Only test if we can use processes and it's not an in memory db

JRuby can't support processes, and in memory db can't support changing
the handlers/connections during the test.
This commit is contained in:
eileencodes 2019-11-16 08:50:38 -05:00
parent b5c6f33f0d
commit b674f04756

View file

@ -95,6 +95,8 @@ class QueryCacheTest < ActiveRecord::TestCase
ActiveRecord::Base.connection_handlers = { writing: ActiveRecord::Base.default_connection_handler }
end
if Process.respond_to?(:fork) && !in_memory_db?
def test_query_cache_with_multiple_handlers_and_forked_processes
ActiveRecord::Base.connection_handlers = {
writing: ActiveRecord::Base.default_connection_handler,
@ -154,7 +156,8 @@ class QueryCacheTest < ActiveRecord::TestCase
rd.close
ensure
ActiveRecord::Base.connection_handlers = { writing: ActiveRecord::Base.default_connection_handler }
end unless in_memory_db?
end
end
def test_query_cache_across_threads
with_temporary_connection_pool do