diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2023-11-18 22:30:52 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2023-11-18 22:30:52 +0000 |
commit | 0a329dce2f94e883f2f29b7731953a3ff6377630 (patch) | |
tree | 4952f94f36f78ac7db87fed6293d8a61cc974182 | |
parent | 92e779cafab1407f79206c89b8e8934b1ea1fe6e (diff) | |
download | redmine-0a329dce2f94e883f2f29b7731953a3ff6377630.tar.gz redmine-0a329dce2f94e883f2f29b7731953a3ff6377630.zip |
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
-rw-r--r-- | test/unit/issue_nested_set_concurrency_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/issue_nested_set_concurrency_test.rb b/test/unit/issue_nested_set_concurrency_test.rb index 93027c490..0f330bcc8 100644 --- a/test/unit/issue_nested_set_concurrency_test.rb +++ b/test/unit/issue_nested_set_concurrency_test.rb @@ -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 |