Merge branch 'stable-3.0' into stable-3.1

* stable-3.0:
  UrlFormatter: Fix Javadoc of getSettingsUrl()
  Add a separator between blame and the edit icon
  Remove target=_self from commentlinks
  Update .mailmap
  ReceiveCommits: Factor repeated "internal server error" text to a constant
  Update .mailmap
  Documentation: Add site-path arg to reindex command
  Isolate log4j dep
  Update .mailmap
  Cancel deprecation of change identifiers
  FakeGroupAuditService: Make auditEvents final
  ErrorProne: Increase severity of MutableConstantField to ERROR
  ConfigUpdatedEvent: Use immutable type in field declaration
  Add missing slf4j dependencies in BUILD file
  JGitMetricModule: fix WindowCache miss ration which wasn't reported
  Revert "JGitMetricModule: Replace anonymous Supplier instances with method references"
  Suppress generic logging on docker start for ElasticSearch container
  Replace deprecated OptionParser with ArgumentParser
  Documentation: Replace plugins list with home page

Change-Id: Idae7755cb887a8df60028a96fff0a01d5d637f8a
This commit is contained in:
David Pursehouse
2020-03-01 17:21:02 +09:00
34 changed files with 288 additions and 898 deletions

View File

@@ -17,6 +17,7 @@ java_library(
"//lib:junit",
"//lib/guice",
"//lib/httpcomponents:httpcore",
"//lib/log:api",
"//lib/testcontainers",
"//lib/testcontainers:testcontainers-elasticsearch",
],

View File

@@ -16,6 +16,8 @@ package com.google.gerrit.elasticsearch;
import org.apache.http.HttpHost;
import org.junit.AssumptionViolatedException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.elasticsearch.ElasticsearchContainer;
/* Helper class for running ES integration tests in docker container */
@@ -74,6 +76,11 @@ public class ElasticContainer extends ElasticsearchContainer {
super(getImageName(version));
}
@Override
protected Logger logger() {
return LoggerFactory.getLogger("org.testcontainers");
}
public HttpHost getHttpHost() {
return new HttpHost(getContainerIpAddress(), getMappedPort(ELASTICSEARCH_DEFAULT_PORT));
}