diff --git a/libs/native/build.gradle b/libs/native/build.gradle index eff8f8243446..50263017c256 100644 --- a/libs/native/build.gradle +++ b/libs/native/build.gradle @@ -21,6 +21,11 @@ dependencies { } } +tasks.named("test").configure { + // this is necessary so that VectorSystemPropertyTests can invoke java + systemProperty "tests.system_call_filter", "false" +} + tasks.withType(CheckForbiddenApisTask).configureEach { replaceSignatureFiles 'jdk-signatures' } diff --git a/libs/native/src/test/java/org/elasticsearch/nativeaccess/VectorSystemPropertyTests.java b/libs/native/src/test/java/org/elasticsearch/nativeaccess/VectorSystemPropertyTests.java index 4cdf04fe5a29..334069b4b554 100644 --- a/libs/native/src/test/java/org/elasticsearch/nativeaccess/VectorSystemPropertyTests.java +++ b/libs/native/src/test/java/org/elasticsearch/nativeaccess/VectorSystemPropertyTests.java @@ -9,6 +9,7 @@ package org.elasticsearch.nativeaccess; +import org.apache.lucene.util.Constants; import org.elasticsearch.core.SuppressForbidden; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.ESTestCase.WithoutSecurityManager; @@ -34,6 +35,8 @@ public class VectorSystemPropertyTests extends ESTestCase { @BeforeClass public static void setup() throws Exception { + assumeTrue("native scorers are not on Windows", Constants.WINDOWS == false); + var classBytes = InMemoryJavaCompiler.compile("p.Test", TEST_SOURCE); Map jarEntries = new HashMap<>(); jarEntries.put("p/Test.class", classBytes); @@ -47,7 +50,8 @@ public class VectorSystemPropertyTests extends ESTestCase { var process = new ProcessBuilder( getJavaExecutable(), "-D" + ENABLE_JDK_VECTOR_LIBRARY + "=false", - "-Xms4m", + "-Xms16m", + "-Xmx16m", "-cp", jarPath + File.pathSeparator + System.getProperty("java.class.path"), "-Des.nativelibs.path=" + System.getProperty("es.nativelibs.path"), diff --git a/muted-tests.yml b/muted-tests.yml index ff83cac1e19c..41dd32d88263 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -17,9 +17,6 @@ tests: - class: "org.elasticsearch.xpack.searchablesnapshots.FrozenSearchableSnapshotsIntegTests" issue: "https://github.com/elastic/elasticsearch/issues/110408" method: "testCreateAndRestorePartialSearchableSnapshot" -- class: org.elasticsearch.nativeaccess.VectorSystemPropertyTests - method: testSystemPropertyDisabled - issue: https://github.com/elastic/elasticsearch/issues/110949 - class: org.elasticsearch.packaging.test.DockerTests method: test021InstallPlugin issue: https://github.com/elastic/elasticsearch/issues/110343