1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-31 11:37:14 +00:00

Workaround to use READ-COMMITTED as transaction_isolation level when running the concurrency tests in MySQL. (#39437).

git-svn-id: https://svn.redmine.org/redmine/trunk@22462 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu 2023-11-18 22:30:52 +00:00
parent 92e779cafa
commit 0a329dce2f

View File

@ -30,6 +30,11 @@ class IssueNestedSetConcurrencyTest < ActiveSupport::TestCase
def setup
skip if sqlite?
if mysql?
connection = ActiveRecord::Base.connection_db_config.configuration_hash.deep_dup
connection[:variables] = { transaction_isolation: "READ-COMMITTED" }
ActiveRecord::Base.establish_connection connection
end
User.current = nil
CustomField.delete_all
end