From bf0889af540f80647fb2aab3642a318bb7aae888 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Fri, 26 Jul 2024 12:28:37 +0100 Subject: [PATCH] backport test fix from main branch (#1413) --- .../org/apache/pekko/dispatch/ForkJoinPoolStarvationSpec.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinPoolStarvationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinPoolStarvationSpec.scala index abc29648f76..bce7b584fa8 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinPoolStarvationSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinPoolStarvationSpec.scala @@ -18,6 +18,7 @@ import com.typesafe.config.ConfigFactory import org.apache.pekko import pekko.actor.{ Actor, Props } import pekko.testkit.{ ImplicitSender, PekkoSpec } +import pekko.util.JavaVersion object ForkJoinPoolStarvationSpec { val config = ConfigFactory.parseString(""" @@ -62,7 +63,7 @@ class ForkJoinPoolStarvationSpec extends PekkoSpec(ForkJoinPoolStarvationSpec.co "not starve tasks arriving from external dispatchers under high internal traffic" in { // TODO issue #31117: starvation with JDK 17 FJP - if (System.getProperty("java.specification.version") == "17") + if (JavaVersion.majorVersion >= 17) pending // Two busy actors that will occupy the threads of the dispatcher