I'm migrating a plugin to the last 7.16.3 version and have trouble figuring out how to make yaml REST tests pass. The ES distribution that is used to run these tests does not seem to include everything needed to run my tests.
This is a plugin that adds geometry computation (simplification) thanks to JTS. The ES distribution used for yamlRestTests (this one if I am correct) does not include geo dependencies (namely legacy-geo, jts and its dependencies).
I am not very comfortable with Gradle, but would there be a simple way to add plugins to the ES distribution before running tests ? or use another custom distribution ?
However, I've already tried to add dependencies to yamlRestTestImplementation. It does resolve problems during compilation of tests, but has no effect during execution of tests.
If I add yamlRestTestImplementation "org.locationtech.jts:jts-core:1.15.0", I still get an error when the tests are launched: java.lang.NoClassDefFoundError: org/locationtech/jts/io/ParseException. I think this is because the ES distribution used for tests is very minimal and does not include these dependencies.
In 6.8, we used to add testClusters.all { testDistribution = 'oss'} so that tests were running on a full-blown OSS distribution of ES (with all dependencies already loaded). But I was not able to find an equivalent in 7.16
Hmm it seems testCulsters.all { testDistribution = 'DEFAULT' } uses a "complete" ES distribution for running tests and gives better results in my case ... (the legacy geo module is here and tests seem to be launched).
So it means 'INTEG_TEST' is the default value ("DEFAULT" is not the default value ...)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.