uschindler commented on code in PR #12311:
URL: https://github.com/apache/lucene/pull/12311#discussion_r1201931143
##########
gradle/testing/defaults-tests.gradle:
##########
@@ -119,11 +119,16 @@ allprojects {
if (rootProject.runtimeJavaVersion < JavaVersion.VERSION_16) {
jvmArgs '--illegal-access=deny'
}
-
+
// Lucene needs to optional modules at runtime, which we want to enforce
for testing
// (if the runner JVM does not support them, it will fail tests):
jvmArgs '--add-modules', 'jdk.unsupported,jdk.management'
+ // Enable the vector incubator module on supported Java versions:
+ if
(rootProject.vectorIncubatorJavaVersions.contains(rootProject.runtimeJavaVersion))
{
+ jvmArgs '--add-modules', 'jdk.incubator.vector'
+ }
+
Review Comment:
We would need to spawn a separate VM from inside the main TestVectorUtil
test (we have other tests that explicitely crush the JVM to check if all
recovers correctly).
A native way so we can run a single test with different options by
randomized runner without refactoring a major amount of the build isn't so
easy. It is doable by adding another Gradle "testVectors" task which is hooeked
as dependency of "test", so runs separately.
We can easily compare the outputs of both implementations by instantiating
the package-private Provider classes from a test and compare results.
For bytes it works easy, for floats we would need a large enough epsilon
when comparing the resulting floats. Or do I miss something here. There are
differences in results, but Assert.assertEquals() is available for floats with
an epsilon.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]