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

Fix test failure if prepared_statements is flipped

This commit is contained in:
Ryuta Kamizono 2020-01-03 18:51:15 +09:00
parent 44af3395ae
commit 1414910502

View file

@ -16,12 +16,7 @@ module ActiveRecord
assert_not_same course_conn, entrant_conn
if current_adapter?(:Mysql2Adapter)
# The mysql adapter does not use prepared
# statements by default.
assert_not course_conn.prepared_statements
assert_not entrant_conn.prepared_statements
else
if ActiveRecord::Base.connection.prepared_statements
t1 = Thread.new do
course_conn.unprepared_statement do
inside.set
@ -44,6 +39,9 @@ module ActiveRecord
t1.join
t2.join
else
assert_not course_conn.prepared_statements
assert_not entrant_conn.prepared_statements
end
end
end