Defect #32022

IssueSubtaskingTest fails with high probability

Added by Go MAEDA 3 months ago. Updated 3 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Code cleanup/refactoring
Target version:3.4.12
Resolution:Fixed Affected version:

Description

$ RAILS_ENV=test bin/rake db:migrate:reset
$ bin/rails test --seed 21196
.
.
.
Failure:
IssueSubtaskingTest#test_parent_total_estimated_hours_should_be_sum_of_visible_descendants [/Users/maeda/redmines/4.0-stable/test/unit/issue_subtasking_test.rb:345]:
Expected: 12
  Actual: 21.0

bin/rails test test/unit/issue_subtasking_test.rb:335

Related issues

Related to Redmine - Defect #31778: Total estimated time issue query column and issue field m... Closed

Associated revisions

Revision 18432
Added by Go MAEDA 3 months ago

Merged r17761 from trunk to 4.0-stable (#32022).

Revision 18433
Added by Go MAEDA 3 months ago

Merged r17761 from trunk to 3.4-stable (#32022).

History

#1 Updated by Go MAEDA 3 months ago

  • Target version set to 4.0.5

I am having been observed this issue since r18359. I think it can be fixed if r17761 is merged to 4.0-stable branch.

#2 Updated by Go MAEDA 3 months ago

The test assumes that User.current is AnonymousUser, who cannot see other user's private issue. The error occurs when User.current is a user whose role has permission to see see other user's private issue.

We can fix the error by backporting r17761 in order to ensure that the User.current is always AnonymousUser. r17761 was committed 9 days after 4.0-stable branch had been created, in order to fix test failures.

#3 Updated by Yuichi HARADA 3 months ago

I backported r17761 to 4.0-stable and performed the same seed test.
I have confirmed that no fail occurred in IssueSubtaskingTest.

#4 Updated by Go MAEDA 3 months ago

  • Related to Defect #31778: Total estimated time issue query column and issue field might leak information added

#5 Updated by Go MAEDA 3 months ago

  • Category set to Code cleanup/refactoring
  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Merged r17761 to 4.0-stable.

#6 Updated by Go MAEDA 3 months ago

  • Subject changed from IssueSubtaskingTest randomly fails in 4.0-stable to IssueSubtaskingTest fails with high probability
  • Status changed from Closed to Reopened
  • Target version changed from 4.0.5 to 3.4.12

3.4-stable branch has the same problem. It also can be fixed by backporting r17761.

$ RAILS_ENV=test bin/rake db:migrate:reset
$ RAILS_ENV=test bin/rake test SEED=46331
.
.
.
  1) Failure:
IssueSubtaskingTest#test_parent_total_estimated_hours_should_be_sum_of_visible_descendants [/Users/maeda/redmines/3.4-stable/test/unit/issue_subtasking_test.rb:334]:
Expected: 12
  Actual: 21.0

#7 Updated by Go MAEDA 3 months ago

  • Status changed from Reopened to Closed

Merged to 3.4-stable.

Also available in: Atom PDF