diff --git a/tests/unit/src/test/scala/tests/JdkVersionSuite.scala b/tests/unit/src/test/scala/tests/JdkVersionSuite.scala index 49d8f71003f..c457e0056f9 100644 --- a/tests/unit/src/test/scala/tests/JdkVersionSuite.scala +++ b/tests/unit/src/test/scala/tests/JdkVersionSuite.scala @@ -12,10 +12,11 @@ class JdkVersionSuite extends FunSuite { implicit val ctx: ExecutionContext = this.munitExecutionContext test("jdk-shell-version") { assertEquals( - JdkVersion.fromShell(javaHome), + JdkVersion.fromShell(javaHome).map(_.major), JdkVersion .fromReleaseFile(javaHome) - .orElse(JdkVersion.parse(System.getProperty("java.version"))), + .orElse(JdkVersion.parse(System.getProperty("java.version"))) + .map(_.major), ) } }