Skip to content

Modernize/simplify JUnit Gradle configuration#2325

Merged
trask merged 9 commits intoopen-telemetry:mainfrom
trask:modernize-junit
Dec 4, 2025
Merged

Modernize/simplify JUnit Gradle configuration#2325
trask merged 9 commits intoopen-telemetry:mainfrom
trask:modernize-junit

Conversation

@trask
Copy link
Copy Markdown
Member

@trask trask commented Oct 1, 2025

No description provided.

@trask trask marked this pull request as ready for review October 1, 2025 23:00
@trask trask requested a review from a team as a code owner October 1, 2025 23:00
@trask trask marked this pull request as draft October 1, 2025 23:13

testing {
suites.withType(JvmTestSuite::class).configureEach {
useJUnitJupiter()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what if you replaced

withType<Test>().configureEach {
  useJUnitPlatform()

with useJUnitPlatform? Doing it only for suites and leaving the rest of the test tasks as they are feels a bit weird.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

sorry, I'm not following what you are suggesting to do

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

oh, do you mean replacing that with useJUnitJupiter? I just tried that and it seems like useJUnitJupiter only works for test suites...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

bump

@trask trask force-pushed the modernize-junit branch 2 times, most recently from f83207b to 33ef393 Compare October 10, 2025 03:47
@trask trask marked this pull request as ready for review October 10, 2025 03:49

testing {
suites.withType(JvmTestSuite::class).configureEach {
useJUnitJupiter("5.13.4")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

intentionally one version behind to verify that Renovate picks it up after merging

@trask trask enabled auto-merge November 25, 2025 03:56
@trask trask added this pull request to the merge queue Dec 4, 2025
Merged via the queue into open-telemetry:main with commit f7dac1b Dec 4, 2025
50 of 54 checks passed
@trask trask deleted the modernize-junit branch December 4, 2025 06:52
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.

3 participants