Defect #19106
closedIssueTest#test_visible_scope_for_member_with_groups_should_return_assigned_issues always fails
0%
Description
As I described at #14534#note-41, test always fails on trunk r13998.
On SQLite3 ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]:
$ ruby test/unit/issue_test.rb Run options: --seed 16583 # Running: ........................................F....................... ................................................................ ................................................................ ......................... Finished in 20.813147s, 10.4261 runs/s, 28.9240 assertions/s. 1) Failure: IssueTest#test_visible_scope_for_member_with_groups_should_return_assigned_issues [test/unit/issue_test.rb:324]: Failed assertion, no message given. 217 runs, 602 assertions, 1 failures, 0 errors, 0 skips
Files
Updated by Jean-Philippe Lang almost 10 years ago
Works for me with this ruby version and sqlite3:
C:\workspace\trunk>ruby test\unit\issue_test.rb --seed 16583 Run options: --seed 16583 # Running: ................................................................................ ................................................................................ ......................................................... Finished in 17.886023s, 12.1324 runs/s, 33.6576 assertions/s. 217 runs, 602 assertions, 0 failures, 0 errors, 0 skips C:\workspace\trunk>ruby --version ruby 1.9.3p551 (2014-11-13) [i386-mingw32]
Does it fail when you run the full test suite?
Updated by Toshi MARUYAMA almost 10 years ago
Fails.
$ rake test:units Version: ImageMagick 6.5.4-7 2014-02-10 Q16 OpenMP http://www.imagemagick.org Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC (Test LDAP server not configured) Bazaar test repository NOT FOUND. Skipping unit tests !!! Cvs test repository NOT FOUND. Skipping unit tests !!! Darcs test repository NOT FOUND. Skipping unit tests !!! Filesystem test repository NOT FOUND. Skipping unit tests !!! See doc/RUNNING_TESTS. Git test repository NOT FOUND. Skipping unit tests !!! Mercurial test repository NOT FOUND. Skipping unit tests !!! Subversion test repository NOT FOUND. Skipping unit tests !!! Bazaar test repository NOT FOUND. Skipping unit tests !!! CVS test repository NOT FOUND. Skipping unit tests !!! Darcs test repository NOT FOUND. Skipping unit tests !!! Filesystem test repository NOT FOUND. Skipping unit tests !!! See doc/RUNNING_TESTS. Git test repository NOT FOUND. Skipping unit tests !!! Mercurial test repository NOT FOUND. Skipping unit tests !!! Subversion test repository NOT FOUND. Skipping unit tests !!! Skipping LDAP tests. Run options: --seed 3007 # Running: S.....................................................................................................................................................................................................................................................................................................................................................................................................................F..............................................................................................................S............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. Finished in 198.634379s, 9.5200 runs/s, 62.9700 assertions/s. 1) Failure: IssueTest#test_visible_scope_for_member_with_groups_should_return_assigned_issues [/REDMINE/hg-workdir/redmine-bb-all/test/unit/issue_test.rb:324]: Failed assertion, no message given. 1891 runs, 12508 assertions, 1 failures, 0 errors, 2 skips You have skipped tests. Run with --verbose for details.
Updated by Jean-Philippe Lang almost 10 years ago
Could you attach the log that you get for this single test?
Updated by Toshi MARUYAMA almost 10 years ago
This is log.
$ ruby test/unit/issue_test.rb -n IssueTest#test_visible_scope_for_member_with_groups_should_return_assigned_issues Run options: -n IssueTest#test_visible_scope_for_member_with_groups_should_return_assigned_issues --seed 20234 # Running: F Finished in 1.741598s, 0.5742 runs/s, 2.8709 assertions/s. 1) Failure: IssueTest#test_visible_scope_for_member_with_groups_should_return_assigned_issues [test/unit/issue_test.rb:324]: Failed assertion, no message given. 1 runs, 5 assertions, 1 failures, 0 errors, 0 skips
Updated by Jean-Philippe Lang almost 10 years ago
Thanks. The issue query seems OK and should return the created issue. Can you run it at r14005, the assertion should be more verbose.
Updated by Jean-Philippe Lang almost 10 years ago
No idea. The query that is generated should return the issue created with project_id=1 assigned_to_id=10
SELECT "issues".* FROM "issues" INNER JOIN "projects" ON "projects"."id" = "issues"."project_id" WHERE (((projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (projects.id IN (5) OR (projects.id IN (5,2,1) AND ((issues.author_id = 8 OR issues.assigned_to_id IN (8,10,11)))))))
The query just before returns it and differs only with an additional issues.is_private = 'f'
condition which doesn't match because the created issue is private:
SELECT "issues".* FROM "issues" INNER JOIN "projects" ON "projects"."id" = "issues"."project_id" WHERE (((projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (projects.id IN (5) OR (projects.id IN (5,2,1) AND ((issues.is_private = 'f' OR issues.author_id = 8 OR issues.assigned_to_id IN (8,10,11)))))))
Updated by Toshi MARUYAMA almost 10 years ago
- Status changed from New to Closed
- Target version deleted (
3.0.0)
I replaced CentOS6 sqlite-3.6.20-1 by Fedora rawhide sqlite-3.8.8-2.fc22.src.rpm.
Then this test passes.