rishabhdaim commented on code in PR #3002:
URL: https://github.com/apache/jackrabbit-oak/pull/3002#discussion_r3528480954
##########
oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticTestServer.java:
##########
@@ -62,39 +65,42 @@ public static synchronized ElasticsearchContainer
getESTestServer() {
return CONTAINER;
}
- @SuppressWarnings("resource")
private synchronized void setup() {
String esDockerImageVersion = ELASTIC_DOCKER_IMAGE_VERSION != null ?
ELASTIC_DOCKER_IMAGE_VERSION : Version.VERSION.toString();
LOG.info("Elasticsearch test Docker image version: {}.",
esDockerImageVersion);
checkIfDockerClientAvailable();
- Network network = Network.newNetwork();
+ network = Network.newNetwork();
CONTAINER = new
ElasticsearchContainer("docker.elastic.co/elasticsearch/elasticsearch:" +
esDockerImageVersion)
.withEnv("ES_JAVA_OPTS", "-Xms1g -Xmx1g")
+ // Keep test transport deterministic across Testcontainers/ES
versions.
+ .withEnv("xpack.security.enabled", "false")
+ .withEnv("xpack.security.http.ssl.enabled", "false")
.withCopyFileToContainer(
MountableFile.forClasspathResource("elasticsearch.yml"),
"/usr/share/elasticsearch/config/elasticsearch.yml")
.withNetwork(network)
.withNetworkAliases("elasticsearch")
+ .waitingFor(Wait.forHttp("/").forPort(9200).forStatusCode(200))
Review Comment:
fixed in
https://github.com/apache/jackrabbit-oak/pull/3002/commits/d516542fc2a7cc2feae01c2eaf83b1709ebe3e55
##########
oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticConnectionRule.java:
##########
@@ -94,8 +96,14 @@ protected void after() {
ElasticConnection esConnection = getElasticConnection();
if (esConnection != null) {
try {
- esConnection.getClient().indices().delete(d ->
d.index(this.indexPrefix + "*"));
Review Comment:
fixed in
https://github.com/apache/jackrabbit-oak/commit/d516542fc2a7cc2feae01c2eaf83b1709ebe3e55
--
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]