プロジェクト

全般

プロフィール

Vote #80468

完了

Avoid class name overlap that causes TypeError on `rake test:system test`

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Code cleanup/refactoring_30
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
30
version_id:
127
issue_org_id:
32432
author_id:
1006
assigned_to_id:
332
comments:
3
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Running test via rake test:system test errs with TypeError because some test class names are overlapping.


$ bundle e rake test:system test
Mercurial test repository NOT FOUND. Skipping functional tests !!!
rake aborted!
TypeError: superclass mismatch for class IssuesTest
.../redmine/test/integration/issues_test.rb:22:in `'
.../activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
.../activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
.../activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
.../activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
.../railties-5.2.3/lib/rails/test_unit/runner.rb:50:in `block in load_tests'
.../railties-5.2.3/lib/rails/test_unit/runner.rb:50:in `each'
.../railties-5.2.3/lib/rails/test_unit/runner.rb:50:in `load_tests'
.../railties-5.2.3/lib/rails/test_unit/runner.rb:39:in `run'
.../railties-5.2.3/lib/rails/test_unit/runner.rb:35:in `rake_run'
.../railties-5.2.3/lib/rails/test_unit/testing.rake:16:in `block in '
.../redmine/bin/bundle:4:in `load'
.../redmine/bin/bundle:4:in `
' Tasks: TOP => test (See full trace by running task with --trace)

The attached patch fixes this error with a minimal patch that appends "System" only to the class names that overlap with integration tests.


journals

Please use textile formatting instead of markdown.
--------------------------------------------------------------------------------
Confirmed the error. Setting the target version to 4.1.0.
--------------------------------------------------------------------------------
Committed the patch. Thank you for your contribution.
--------------------------------------------------------------------------------

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0