Skip to content

Update Junit 5 to latest#1909

Open
rozza wants to merge 3 commits intomongodb:mainfrom
rozza:JAVA-6125
Open

Update Junit 5 to latest#1909
rozza wants to merge 3 commits intomongodb:mainfrom
rozza:JAVA-6125

Conversation

@rozza
Copy link
Member

@rozza rozza commented Mar 12, 2026

Test Scala 3 on Java 8

JAVA-6125

@rozza rozza force-pushed the JAVA-6125 branch 4 times, most recently from 8c4a620 to bdd2356 Compare March 16, 2026 13:44
Test Scala 3 on Java 8

JAVA-6125
@rozza
Copy link
Member Author

rozza commented Mar 16, 2026

@rozza rozza marked this pull request as ready for review March 16, 2026 15:08
@rozza rozza requested a review from a team as a code owner March 16, 2026 15:08
@rozza rozza requested a review from vbabanin March 16, 2026 15:08
package org.mongodb.scala.unified

object ClientEncryptionTest extends UnifiedTest {
class ClientEncryptionTest extends UnifiedTest {
Copy link
Member Author

Choose a reason for hiding this comment

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

Had to change so the data method is no longer static.

override def createClientEncryption(
keyVaultClient: JMongoClient,
clientEncryptionSettings: JClientEncryptionSettings
): JClientEncryption = {
Copy link
Member Author

Choose a reason for hiding this comment

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

spotless automatic changes

junit-bom = { module = "org.junit:junit-bom", version.ref = "junit-bom" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter" }
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params" }
junit-jupiter-platform-launcher = { module = "org.junit.platform:junit-platform-launcher" }
Copy link
Member Author

Choose a reason for hiding this comment

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

The platform launcher was needed to be explicit - otherwise the knockon effect was kotlin tests failing due to junit version disparities

.filter(parameterResolver -> parameterResolver.getClass().getName().contains("ParameterizedTestParameterResolver"))
.filter(parameterResolver -> {
String name = parameterResolver.getClass().getName();
// JUnit 5.10: ParameterizedTestParameterResolver
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need the JUnit 5.10 configuration? It looks like all modules now depend on 5.14.

P.S. I kicked off a build without the ParameterizedTestParameterResolver check and didn’t see any failures related to the resolver: patch

Copy link
Member Author

Choose a reason for hiding this comment

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

I removed and have updated the error message as well.

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.

2 participants