From fc3fe67a4251ddb6fe5b1c914457798f9b4eb5da Mon Sep 17 00:00:00 2001 From: Roger Abelenda Date: Wed, 16 Oct 2024 09:46:42 -0300 Subject: [PATCH] Set JVM system property to avoid Nashorn engine deprecation warning --- .../jmeter/javadsl/core/engines/EmbeddedJmeterEngine.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jmeter-java-dsl/src/main/java/us/abstracta/jmeter/javadsl/core/engines/EmbeddedJmeterEngine.java b/jmeter-java-dsl/src/main/java/us/abstracta/jmeter/javadsl/core/engines/EmbeddedJmeterEngine.java index 6e6da270..f6ffd4a1 100644 --- a/jmeter-java-dsl/src/main/java/us/abstracta/jmeter/javadsl/core/engines/EmbeddedJmeterEngine.java +++ b/jmeter-java-dsl/src/main/java/us/abstracta/jmeter/javadsl/core/engines/EmbeddedJmeterEngine.java @@ -94,6 +94,8 @@ public TestPlanStats run(DslTestPlan testPlan) throws IOException { } protected TestPlanStats runInEnv(DslTestPlan testPlan, JmeterEnvironment env) throws IOException { + // Avoid warning in java 11 + System.setProperty("nashorn.args", "--no-deprecation-warning"); Properties jmeterProps = JMeterUtils.getJMeterProperties(); if (propsFile != null) { try (FileInputStream is = new FileInputStream(propsFile)) {