Fix and unmute VectorSystemPropertyTests (#115927)

This commit is contained in:
Chris Hegarty 2024-11-01 13:07:03 +00:00 committed by GitHub
parent 7de15a0cb8
commit 0aa25a9023
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 4 deletions

View file

@ -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'
}

View file

@ -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<String, byte[]> 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"),

View file

@ -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