diff options
Diffstat (limited to 'core/src/test/java/org/elasticsearch/recovery/RelocationIT.java')
-rw-r--r-- | core/src/test/java/org/elasticsearch/recovery/RelocationIT.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java b/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java index f32688aaff..8848a61c97 100644 --- a/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java +++ b/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java @@ -165,7 +165,7 @@ public class RelocationIT extends ESIntegTestCase { logger.info("--> verifying count"); client().admin().indices().prepareRefresh().execute().actionGet(); - assertThat(client().prepareSearch("test").setSize(0).execute().actionGet().getHits().totalHits(), equalTo(20L)); + assertThat(client().prepareSearch("test").setSize(0).execute().actionGet().getHits().getTotalHits(), equalTo(20L)); logger.info("--> start another node"); final String node_2 = internalCluster().startNode(); @@ -182,7 +182,7 @@ public class RelocationIT extends ESIntegTestCase { logger.info("--> verifying count again..."); client().admin().indices().prepareRefresh().execute().actionGet(); - assertThat(client().prepareSearch("test").setSize(0).execute().actionGet().getHits().totalHits(), equalTo(20L)); + assertThat(client().prepareSearch("test").setSize(0).execute().actionGet().getHits().getTotalHits(), equalTo(20L)); } @TestLogging("org.elasticsearch.action.bulk:TRACE,org.elasticsearch.action.search:TRACE") @@ -256,14 +256,14 @@ public class RelocationIT extends ESIntegTestCase { logger.info("--> START search test round {}", i + 1); SearchHits hits = client().prepareSearch("test").setQuery(matchAllQuery()).setSize((int) indexer.totalIndexedDocs()).storedFields().execute().actionGet().getHits(); ranOnce = true; - if (hits.totalHits() != indexer.totalIndexedDocs()) { + if (hits.getTotalHits() != indexer.totalIndexedDocs()) { int[] hitIds = new int[(int) indexer.totalIndexedDocs()]; for (int hit = 0; hit < indexer.totalIndexedDocs(); hit++) { hitIds[hit] = hit + 1; } IntHashSet set = IntHashSet.from(hitIds); - for (SearchHit hit : hits.hits()) { - int id = Integer.parseInt(hit.id()); + for (SearchHit hit : hits.getHits()) { + int id = Integer.parseInt(hit.getId()); if (!set.remove(id)) { logger.error("Extra id [{}]", id); } @@ -272,7 +272,7 @@ public class RelocationIT extends ESIntegTestCase { logger.error("Missing id [{}]", value); }); } - assertThat(hits.totalHits(), equalTo(indexer.totalIndexedDocs())); + assertThat(hits.getTotalHits(), equalTo(indexer.totalIndexedDocs())); logger.info("--> DONE search test round {}", i + 1); } @@ -369,9 +369,9 @@ public class RelocationIT extends ESIntegTestCase { SearchResponse response = client.prepareSearch("test").setPreference("_local").setSize(0).get(); assertNoFailures(response); if (expectedCount < 0) { - expectedCount = response.getHits().totalHits(); + expectedCount = response.getHits().getTotalHits(); } else { - assertEquals(expectedCount, response.getHits().totalHits()); + assertEquals(expectedCount, response.getHits().getTotalHits()); } } |