Skip to content

Conversation

@vogella
Copy link
Contributor

@vogella vogella commented Dec 28, 2025

Migrates tests in org.eclipse.ui.tests from CloseTestWindowsRule (JUnit 4) to CloseTestWindowsExtension (JUnit 5).

Changes include:

  • Replacing CloseTestWindowsRule with CloseTestWindowsExtension.
  • Updating imports to JUnit 5.
  • Converting annotations: @Rule -> @ExtendWith, @Ignore -> @Disabled, @Before -> @BeforeEach.
  • Updating assertions to match JUnit 5 argument order (message last).

Tests migrated:

  • Bug43321Test
  • Bug53489Test
  • Bug44460Test
  • Bug41931Test
  • Bug40023Test
  • Bug36537Test
  • PerspectiveSwitcherTest
  • TextHandlerTest
  • StickyViewManagerTest

public final CloseTestWindowsRule closeTestWindowsRule = new CloseTestWindowsRule();

@Rule
public final PreferenceMementoRule preferenceMemento = new PreferenceMementoRule();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should also be migrated to Junit 5

@vogella
Copy link
Contributor Author

vogella commented Dec 28, 2025

PreferenceMementoRule should also be migrated to Junit 5

@github-actions
Copy link
Contributor

github-actions bot commented Dec 28, 2025

Test Results

 3 015 files  ±0   3 015 suites  ±0   2h 17m 57s ⏱️ + 9m 18s
 8 258 tests ±0   8 010 ✅ ±0  248 💤 ±0  0 ❌ ±0 
23 598 runs  ±0  22 807 ✅ ±0  791 💤 ±0  0 ❌ ±0 

Results for commit 4b935a9. ± Comparison against base commit 8032c04.

♻️ This comment has been updated with latest results.

@vogella vogella force-pushed the migrate-closetestwindows-junit5-part2 branch 3 times, most recently from ef718b0 to 8f0d8a4 Compare January 3, 2026 16:10
Also migrate to PreferenceMementoExtension
Migrated 10 tests in org.eclipse.ui.tests from using
CloseTestWindowsRule
(JUnit 4) to CloseTestWindowsExtension (JUnit 5).
Updates include replacing imports, annotations (@rule -> @ExtendWith,
@ignore -> @disabled, @before -> @beforeeach), and updating assertion
argument order.
@vogella vogella force-pushed the migrate-closetestwindows-junit5-part2 branch from 8f0d8a4 to 4b935a9 Compare January 4, 2026 19:31
@vogella vogella changed the title Migrate 10 tests to JUnit 5 using CloseTestWindowsExtension Migrate tests to JUnit 5 using CloseTestWindowsExtension Jan 4, 2026
@vogella
Copy link
Contributor Author

vogella commented Jan 4, 2026

LGTM, planning to merge tomorrow

@vogella vogella merged commit 8e47cc1 into eclipse-platform:master Jan 5, 2026
18 checks passed
@vogella vogella deleted the migrate-closetestwindows-junit5-part2 branch January 5, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant