eclipse.platform icon indicating copy to clipboard operation
eclipse.platform copied to clipboard

Migrate save participant tests to JUnit 5 #903

Open HeikoKlare opened this issue 1 year ago • 2 comments

This migrates the SaveManagerTest to JUnit 5, using the SessionTestExtension with the CustomSessionWorkspace. It consists of the following changes:

  • the individual test suites in the subclasses of SaveManagerTest were unused and are thus removed
  • further unused functionality in those subclasses is removed
  • JUnit 4 dependencies are replaced with JUnit 5 dependencies in the plug-in org.eclipse.core.tests.resources.saveparticipant
  • the plug-in org.eclipse.core.tests.resources.saveparticipant is declared as a test plug-in and tests are enabled for the Maven build
  • the SaveParticipantTest, which executed the SaveManagerTest from the central org.eclipse.core.tests.resources plug-in, is removed as it was not part of any test suite (and thus not executed) anyway

Contributes to https://github.com/eclipse-platform/eclipse.platform/issues/903

HeikoKlare avatar May 15 '24 20:05 HeikoKlare

Test Results

 1 737 files  +3   1 737 suites  +3   1h 22m 30s :stopwatch: +42s  3 972 tests +3   3 950 :white_check_mark: +3   22 :zzz: ±0  0 :x: ±0  12 513 runs  +9  12 352 :white_check_mark: +9  161 :zzz: ±0  0 :x: ±0 

Results for commit 7301f6dd. ± Comparison against base commit e47558e4.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar May 15 '24 21:05 github-actions[bot]

SaveManagerTests are now executed successfully:

Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.734 s -- in org.eclipse.core.tests.resources.saveparticipant.SaveManagerTest
org.eclipse.core.tests.resources.saveparticipant.SaveManagerTest.test1 -- Time elapsed: 3.653 s
org.eclipse.core.tests.resources.saveparticipant.SaveManagerTest.test2 -- Time elapsed: 2.599 s
org.eclipse.core.tests.resources.saveparticipant.SaveManagerTest.test3 -- Time elapsed: 2.460 s

Even though the actions bot does not list added tests, there are three more than before.

Log of this PR build: 4007 tests found

Log of master: 4004 tests found

HeikoKlare avatar May 15 '24 21:05 HeikoKlare