Fix OTel JUnit5 Extension cleanup when using Nested test classes by ps-mir · Pull Request #7999 · open-telemetry/opentelemetry-java
added 4 commits
January 21, 2026 16:45Reproduces issue open-telemetry#7919 where extension's `afterAll` hook is called prematurely after one nested test class execution completes, making the extension unusable for other nested test class.
The afterAll lifecycle callback requires a valid ExtensionContext to determine if cleanup should occur at the top level. The test was previously passing null, causing NPE after the nested class handling logic was added.
ps-mir
marked this pull request as ready for review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters