mirror of
https://github.com/redmine/redmine.git
synced 2026-01-27 09:49:57 +01:00
Revert undesired change (#22458).
git-svn-id: https://svn.redmine.org/redmine/trunk@22460 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user