From 0abd3b9c74aad6f0c87dedbcfe8240b9dc065bf3 Mon Sep 17 00:00:00 2001 From: Katarzyna Marek Date: Wed, 3 Apr 2024 14:29:42 +0200 Subject: [PATCH] test: fix JDK version test --- tests/unit/src/test/scala/tests/JdkVersionSuite.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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), ) } }