summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Arès <hugo.ares@ericsson.com>2018-06-14 13:49:22 -0400
committerHugo Arès <hugo.ares@ericsson.com>2018-06-14 14:00:16 -0400
commit99e8250b8136e09746d4993953c3cf6e2ddd12a8 (patch)
tree1c3d9651e8022f66605dbbb20474f0fb349f69a7
parent36d56eba98ecd3e54886b5ad2d08355acb283caf (diff)
Make ElasticReindexIT tests fail if test container fails to start
If the container was failing to start, the exception was swallowed, the rest of the method configuring ES as the index was not executed and the test was proceeding using the default index which is lucene. Bug: Issue 9265 Change-Id: I66f8d48e766bee505900c135d41542bdb886ca60
-rw-r--r--gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/pgm/ElasticReindexIT.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/pgm/ElasticReindexIT.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/pgm/ElasticReindexIT.java
index 071600e4e1..e8b1dbea59 100644
--- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/pgm/ElasticReindexIT.java
+++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/pgm/ElasticReindexIT.java
@@ -29,12 +29,8 @@ public class ElasticReindexIT extends AbstractReindexTests {
private static Config getConfig(ElasticVersion version) {
ElasticNodeInfo elasticNodeInfo;
- try {
- container = ElasticContainer.createAndStart(version);
- elasticNodeInfo = new ElasticNodeInfo(container.getHttpHost().getPort());
- } catch (Throwable t) {
- return null;
- }
+ container = ElasticContainer.createAndStart(version);
+ elasticNodeInfo = new ElasticNodeInfo(container.getHttpHost().getPort());
String indicesPrefix = UUID.randomUUID().toString();
Config cfg = new Config();
ElasticTestUtils.configure(cfg, elasticNodeInfo.port, indicesPrefix);