diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequestTests.java b/core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequestTests.java index 011ce815a01..291c7bc5c19 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequestTests.java +++ b/core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequestTests.java @@ -45,19 +45,19 @@ public class IndicesSegmentsRequestTests extends ESSingleNodeTestCase { String id = Integer.toString(j); client().prepareIndex("test", "type1", id).setSource("text", "sometext").get(); } - client().admin().indices().prepareFlush("test").get(); + client().admin().indices().prepareFlush("test").setWaitIfOngoing(true).get(); } public void testBasic() { IndicesSegmentResponse rsp = client().admin().indices().prepareSegments("test").get(); List segments = rsp.getIndices().get("test").iterator().next().getShards()[0].getSegments(); - assertNull(segments.get(0).ramTree); + assertNull(segments.get(0).toString(), segments.get(0).ramTree); } public void testVerbose() { IndicesSegmentResponse rsp = client().admin().indices().prepareSegments("test").setVerbose(true).get(); List segments = rsp.getIndices().get("test").iterator().next().getShards()[0].getSegments(); - assertNotNull(segments.get(0).ramTree); + assertNotNull(segments.get(0).toString(), segments.get(0).ramTree); } /**