Skip to content

Commit 0aa25a9

Browse files
authored
Fix and unmute VectorSystemPropertyTests (#115927)
1 parent 7de15a0 commit 0aa25a9

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

libs/native/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ dependencies {
2121
}
2222
}
2323

24+
tasks.named("test").configure {
25+
// this is necessary so that VectorSystemPropertyTests can invoke java
26+
systemProperty "tests.system_call_filter", "false"
27+
}
28+
2429
tasks.withType(CheckForbiddenApisTask).configureEach {
2530
replaceSignatureFiles 'jdk-signatures'
2631
}

libs/native/src/test/java/org/elasticsearch/nativeaccess/VectorSystemPropertyTests.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
package org.elasticsearch.nativeaccess;
1111

12+
import org.apache.lucene.util.Constants;
1213
import org.elasticsearch.core.SuppressForbidden;
1314
import org.elasticsearch.test.ESTestCase;
1415
import org.elasticsearch.test.ESTestCase.WithoutSecurityManager;
@@ -34,6 +35,8 @@ public class VectorSystemPropertyTests extends ESTestCase {
3435

3536
@BeforeClass
3637
public static void setup() throws Exception {
38+
assumeTrue("native scorers are not on Windows", Constants.WINDOWS == false);
39+
3740
var classBytes = InMemoryJavaCompiler.compile("p.Test", TEST_SOURCE);
3841
Map<String, byte[]> jarEntries = new HashMap<>();
3942
jarEntries.put("p/Test.class", classBytes);
@@ -47,7 +50,8 @@ public void testSystemPropertyDisabled() throws Exception {
4750
var process = new ProcessBuilder(
4851
getJavaExecutable(),
4952
"-D" + ENABLE_JDK_VECTOR_LIBRARY + "=false",
50-
"-Xms4m",
53+
"-Xms16m",
54+
"-Xmx16m",
5155
"-cp",
5256
jarPath + File.pathSeparator + System.getProperty("java.class.path"),
5357
"-Des.nativelibs.path=" + System.getProperty("es.nativelibs.path"),

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ tests:
1717
- class: "org.elasticsearch.xpack.searchablesnapshots.FrozenSearchableSnapshotsIntegTests"
1818
issue: "https://github.com/elastic/elasticsearch/issues/110408"
1919
method: "testCreateAndRestorePartialSearchableSnapshot"
20-
- class: org.elasticsearch.nativeaccess.VectorSystemPropertyTests
21-
method: testSystemPropertyDisabled
22-
issue: https://github.com/elastic/elasticsearch/issues/110949
2320
- class: org.elasticsearch.packaging.test.DockerTests
2421
method: test021InstallPlugin
2522
issue: https://github.com/elastic/elasticsearch/issues/110343

0 commit comments

Comments
 (0)