sergehuber commented on code in PR #759:
URL: https://github.com/apache/unomi/pull/759#discussion_r3323403272
##########
itests/pom.xml:
##########
@@ -247,43 +259,64 @@
</executions>
</plugin>
<plugin>
- <groupId>com.github.alexcojocaru</groupId>
- <artifactId>elasticsearch-maven-plugin</artifactId>
- <!-- REPLACE THE FOLLOWING WITH THE PLUGIN VERSION YOU
NEED -->
- <version>6.29</version>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
<configuration>
- <!--
<downloadUrl>https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-9.2.1-darwin-aarch64.tar
- .gz</downloadUrl> -->
-
<clusterName>contextElasticSearchITests</clusterName>
- <transportPort>9500</transportPort>
- <httpPort>9400</httpPort>
- <version>${elasticsearch.test.version}</version>
- <autoCreateIndex>true</autoCreateIndex>
-
<instanceStartupTimeout>120</instanceStartupTimeout>
- <environmentVariables>
- <ES_JAVA_OPTS>-Xms4g -Xmx4g</ES_JAVA_OPTS>
- </environmentVariables>
- <instanceSettings>
- <properties>
- <xpack.ml.enabled>false</xpack.ml.enabled>
-
<path.repo>${project.build.directory}/snapshots_repository</path.repo>
-
<cluster.routing.allocation.disk.threshold_enabled>false</cluster.routing.allocation.disk.threshold_enabled>
-
<http.cors.allow-methods>OPTIONS,HEAD,GET,POST,PUT,DELETE</http.cors.allow-methods>
-
<http.cors.allow-headers>Authorization,X-Requested-With,X-Auth-Token,Content-Type,Content-Length</http.cors.allow-headers>
- </properties>
- </instanceSettings>
+
<containerNamePattern>itests-elasticsearch</containerNamePattern>
+ <images>
+ <image>
+
<name>docker.elastic.co/elasticsearch/elasticsearch:${elasticsearch.test.version}</name>
+ <alias>elasticsearch</alias>
+ <run>
+ <ports>
+
<port>${elasticsearch.port}:9200</port>
+ </ports>
+ <env>
+
<discovery.type>single-node</discovery.type>
+ <ES_JAVA_OPTS>-Xms8g -Xmx8g
-Dcluster.default.index.settings.number_of_replicas=0</ES_JAVA_OPTS>
Review Comment:
Good catch, you're absolutely right. I've removed it from `ES_JAVA_OPTS`
entirely — rather than moving it to a separate `<env>` entry, I chose to drop
it because Unomi creates its own indices with explicit settings so a
cluster-level default isn't needed here. The same mistake was also present in
the OpenSearch `OPENSEARCH_JAVA_OPTS`, so I cleaned that one up too.
##########
itests/pom.xml:
##########
@@ -247,43 +259,64 @@
</executions>
</plugin>
<plugin>
- <groupId>com.github.alexcojocaru</groupId>
- <artifactId>elasticsearch-maven-plugin</artifactId>
- <!-- REPLACE THE FOLLOWING WITH THE PLUGIN VERSION YOU
NEED -->
- <version>6.29</version>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
<configuration>
- <!--
<downloadUrl>https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-9.2.1-darwin-aarch64.tar
- .gz</downloadUrl> -->
-
<clusterName>contextElasticSearchITests</clusterName>
- <transportPort>9500</transportPort>
- <httpPort>9400</httpPort>
- <version>${elasticsearch.test.version}</version>
- <autoCreateIndex>true</autoCreateIndex>
-
<instanceStartupTimeout>120</instanceStartupTimeout>
- <environmentVariables>
- <ES_JAVA_OPTS>-Xms4g -Xmx4g</ES_JAVA_OPTS>
- </environmentVariables>
- <instanceSettings>
- <properties>
- <xpack.ml.enabled>false</xpack.ml.enabled>
-
<path.repo>${project.build.directory}/snapshots_repository</path.repo>
-
<cluster.routing.allocation.disk.threshold_enabled>false</cluster.routing.allocation.disk.threshold_enabled>
-
<http.cors.allow-methods>OPTIONS,HEAD,GET,POST,PUT,DELETE</http.cors.allow-methods>
-
<http.cors.allow-headers>Authorization,X-Requested-With,X-Auth-Token,Content-Type,Content-Length</http.cors.allow-headers>
- </properties>
- </instanceSettings>
+
<containerNamePattern>itests-elasticsearch</containerNamePattern>
+ <images>
+ <image>
+
<name>docker.elastic.co/elasticsearch/elasticsearch:${elasticsearch.test.version}</name>
+ <alias>elasticsearch</alias>
+ <run>
+ <ports>
+
<port>${elasticsearch.port}:9200</port>
+ </ports>
+ <env>
+
<discovery.type>single-node</discovery.type>
+ <ES_JAVA_OPTS>-Xms8g -Xmx8g
-Dcluster.default.index.settings.number_of_replicas=0</ES_JAVA_OPTS>
Review Comment:
Fixed — the heap is now controlled by a `${elasticsearch.heap}` Maven
property (default: `4g`), which aligns it with the OpenSearch profile and makes
it easy to override per-run with `-Delasticsearch.heap=8g` if needed. Thanks
for pointing that out.
--
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]