From cc613480136b4c5d6ed2f23dd6a17c396703641a Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Fri, 13 Dec 2013 14:54:21 +0100 Subject: [PATCH] Fixed test bug --- .../org/elasticsearch/percolator/PercolatorTests.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/test/java/org/elasticsearch/percolator/PercolatorTests.java b/src/test/java/org/elasticsearch/percolator/PercolatorTests.java index a40bf09294d..584fc0fa58e 100644 --- a/src/test/java/org/elasticsearch/percolator/PercolatorTests.java +++ b/src/test/java/org/elasticsearch/percolator/PercolatorTests.java @@ -1314,9 +1314,8 @@ public class PercolatorTests extends ElasticsearchIntegrationTest { .field("term_vector", "with_positions_offsets").endObject() .endObject() .endObject().endObject() - ) - .execute().actionGet(); - } if (randomBoolean()) { + ).get(); + } else if (randomBoolean()) { // plain hl with stored fields client.admin().indices().preparePutMapping("test").setType("type") .setSource( @@ -1325,8 +1324,7 @@ public class PercolatorTests extends ElasticsearchIntegrationTest { .startObject("field1").field("type", "string").field("store", true).endObject() .endObject() .endObject().endObject() - ) - .execute().actionGet(); + ).get(); } else if (randomBoolean()) { // positions hl client.admin().indices().preparePutMapping("test").setType("type") @@ -1338,8 +1336,7 @@ public class PercolatorTests extends ElasticsearchIntegrationTest { .endObject() .endObject() .endObject().endObject() - ) - .execute().actionGet(); + ).get(); } logger.info("--> register a queries");