summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/unit/issue_nested_set_concurrency_test.rb5
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