diff --git a/integration/local/resources/mill-jvm-opts/.mill-jvm-opts b/integration/local/resources/mill-jvm-opts/.mill-jvm-opts index 783fe652344..fca75785134 100644 --- a/integration/local/resources/mill-jvm-opts/.mill-jvm-opts +++ b/integration/local/resources/mill-jvm-opts/.mill-jvm-opts @@ -1,3 +1,4 @@ # comment after an empty line -DPROPERTY_PROPERLY_SET_VIA_JVM_OPTS=value-from-file +-Xss120m diff --git a/integration/local/resources/mill-jvm-opts/build.sc b/integration/local/resources/mill-jvm-opts/build.sc index d015383e8bd..6de43ccb014 100644 --- a/integration/local/resources/mill-jvm-opts/build.sc +++ b/integration/local/resources/mill-jvm-opts/build.sc @@ -1,7 +1,17 @@ import mill._ +import java.lang.management.ManagementFactory +import scala.jdk.CollectionConverters._ def checkJvmOpts() = T.command { val prop = System.getProperty("PROPERTY_PROPERLY_SET_VIA_JVM_OPTS") if (prop != "value-from-file") sys.error("jvm-opts not correctly applied, value was: " + prop) + val runtime = ManagementFactory.getRuntimeMXBean() + val args = runtime.getInputArguments().asScala.toSet + if (!args.contains("-DPROPERTY_PROPERLY_SET_VIA_JVM_OPTS=value-from-file")) { + sys.error("jvm-opts not correctly applied, args were: " + args.mkString) + } + if (!args.contains("-Xss120m")) { + sys.error("jvm-opts not correctly applied, args were: " + args.mkString) + } () } diff --git a/integration/local/src/IntegrationTestSuite.scala b/integration/local/src/IntegrationTestSuite.scala index a6cb5fcfc10..db55489ebcd 100644 --- a/integration/local/src/IntegrationTestSuite.scala +++ b/integration/local/src/IntegrationTestSuite.scala @@ -7,7 +7,7 @@ abstract class IntegrationTestSuite( override val workspaceSlug: String, fork: Boolean, clientServer: Boolean = false -) extends ScriptTestSuite(fork) { +) extends ScriptTestSuite(fork, clientServer) { override def workspacePath: os.Path = os.Path(sys.props.getOrElse("MILL_WORKSPACE_PATH", ???)) / workspaceSlug