diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2023-11-18 16:36:23 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2023-11-18 16:36:23 +0000 |
commit | a2c203cca02a5eed685d30b02131a243d7635239 (patch) | |
tree | 0291db5e746a234c79e7e5ee57b7794f461c1dd3 /test/unit | |
parent | a54155d2064d2af002eef17abd724cdea1b81d21 (diff) | |
download | redmine-a2c203cca02a5eed685d30b02131a243d7635239.tar.gz redmine-a2c203cca02a5eed685d30b02131a243d7635239.zip |
Revert undesired change (#22458).
git-svn-id: https://svn.redmine.org/redmine/trunk@22460 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/issue_nested_set_concurrency_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/unit/issue_nested_set_concurrency_test.rb b/test/unit/issue_nested_set_concurrency_test.rb index b7f3cac13..0c3f9e6a8 100644 --- a/test/unit/issue_nested_set_concurrency_test.rb +++ b/test/unit/issue_nested_set_concurrency_test.rb @@ -59,6 +59,21 @@ class IssueNestedSetConcurrencyTest < ActiveSupport::TestCase end end + def test_concurrent_subtasks_creation + root = Issue.generate! + assert_difference 'Issue.count', 30 do + threaded(3) do + 10.times do + Issue.generate! :parent_issue_id => root.id + end + end + end + root.reload + assert_equal [1, 62], [root.lft, root.rgt] + children_bounds = root.children.sort_by(&:lft).map {|c| [c.lft, c.rgt]}.flatten + assert_equal (2..61).to_a, children_bounds + end + private def threaded(count, &block) |