Patch #32432

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

Added by Akira Matsuda 12 days ago. Updated 10 days ago.

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

0%

Category:Code cleanup/refactoring
Target version:4.1.0

Description

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 `<top (required)>'
.../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 <top (required)>'
.../redmine/bin/bundle:4:in `load'
.../redmine/bin/bundle:4:in `<main>'
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.

system_test_superclass_mismatch.patch Magnifier (1.39 KB) Akira Matsuda, 2019-11-07 07:27

Associated revisions

Revision 18995
Added by Go MAEDA 10 days ago

Avoid class name overlap that causes TypeError on `rake test:system test` (#32432).

Patch by Akira Matsuda.

History

#1 Updated by Marius BALTEANU 12 days ago

  • Description updated (diff)

Please use textile formatting instead of markdown.

#2 Updated by Go MAEDA 10 days ago

  • Category set to Code cleanup/refactoring
  • Target version set to 4.1.0

Confirmed the error. Setting the target version to 4.1.0.

#3 Updated by Go MAEDA 10 days ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch. Thank you for your contribution.

Also available in: Atom PDF