Skip to content

Conversation

@jonahgraham
Copy link
Contributor

While working on #2685 and specifically trying to verify that change fixes the comment below * I realized that a migration step was missed changing the suites from JUnit4 to JUnit5.

On JUnit5 the @BeforeAll and @AfterAll only apply to the tests in the class itself, not to @SelectClasses too.

Instead JUnit5 provides @BeforeSuite and @AfterSuite

* this comment:

For some reason, printing to System.err in JUnit test has no effect

jonahgraham added a commit to jonahgraham/eclipse.platform.swt that referenced this pull request Oct 28, 2025
In eclipse-platform#2686
I fixed/reenabled the leak detection reporting. This PR
introduces a leaked image (and disables most tests) to verify
that eclipse-platform#2686
really is working.
@github-actions
Copy link
Contributor

github-actions bot commented Oct 28, 2025

Test Results

  118 files  ±0    118 suites  ±0   14m 40s ⏱️ +40s
4 647 tests ±0  4 629 ✅ ±0  18 💤 ±0  0 ❌ ±0 
  330 runs  ±0    326 ✅ ±0   4 💤 ±0  0 ❌ ±0 

Results for commit 827988f. ± Comparison against base commit c308fd1.

♻️ This comment has been updated with latest results.

@jonahgraham
Copy link
Contributor Author

jonahgraham commented Oct 28, 2025

😢 Unfortunately with leak detection not running for sometime some resources leaks have snuck into the testsuite. Positive side is that at least some the leaks are in the tests I just wrote for the clipboard.

I created PR #2687 to verify that leak detection worked, but clearly it does again now!

While working on eclipse-platform#2685
and specifically trying to verify that change fixes the comment below \*
I realized that a migration step was missed changing the suites from
JUnit4 to JUnit5.

On JUnit5 the `@BeforeAll` and `@AfterAll` only apply to the tests in
the class itself, not to `@SelectClasses` too.

Instead JUnit5 provides `@BeforeSuite` and `@AfterSuite`

\* this comment:

> For some reason, printing to System.err in JUnit test has no effect
@jonahgraham jonahgraham merged commit fe1ede8 into eclipse-platform:master Oct 29, 2025
17 checks passed
@jonahgraham jonahgraham deleted the fix-leak-detection branch October 29, 2025 12:58
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