diff --git a/core/src/test/java/org/elasticsearch/search/profile/QueryProfilerIT.java b/core/src/test/java/org/elasticsearch/search/profile/QueryProfilerIT.java index bb33364a751..22772ff4a15 100644 --- a/core/src/test/java/org/elasticsearch/search/profile/QueryProfilerIT.java +++ b/core/src/test/java/org/elasticsearch/search/profile/QueryProfilerIT.java @@ -73,6 +73,7 @@ public class QueryProfilerIT extends ESIntegTestCase { .execute().actionGet(); assertNotNull("Profile response element should not be null", resp.getProfileResults()); + assertThat("Profile response should not be an empty array", resp.getProfileResults().size(), not(0)); for (Map.Entry> shard : resp.getProfileResults().entrySet()) { for (ProfileShardResult searchProfiles : shard.getValue()) { for (ProfileResult result : searchProfiles.getQueryResults()) { @@ -195,6 +196,7 @@ public class QueryProfilerIT extends ESIntegTestCase { Map> p = resp.getProfileResults(); assertNotNull(p); + assertThat("Profile response should not be an empty array", resp.getProfileResults().size(), not(0)); for (Map.Entry> shardResult : resp.getProfileResults().entrySet()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) { @@ -240,6 +242,7 @@ public class QueryProfilerIT extends ESIntegTestCase { Map> p = resp.getProfileResults(); assertNotNull(p); + assertThat("Profile response should not be an empty array", resp.getProfileResults().size(), not(0)); for (Map.Entry> shardResult : resp.getProfileResults().entrySet()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) { @@ -307,6 +310,7 @@ public class QueryProfilerIT extends ESIntegTestCase { .execute().actionGet(); assertNotNull("Profile response element should not be null", resp.getProfileResults()); + assertThat("Profile response should not be an empty array", resp.getProfileResults().size(), not(0)); for (Map.Entry> shardResult : resp.getProfileResults().entrySet()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) { @@ -358,6 +362,7 @@ public class QueryProfilerIT extends ESIntegTestCase { .execute().actionGet(); assertNotNull("Profile response element should not be null", resp.getProfileResults()); + assertThat("Profile response should not be an empty array", resp.getProfileResults().size(), not(0)); for (Map.Entry> shardResult : resp.getProfileResults().entrySet()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) { @@ -404,6 +409,7 @@ public class QueryProfilerIT extends ESIntegTestCase { .execute().actionGet(); assertNotNull("Profile response element should not be null", resp.getProfileResults()); + assertThat("Profile response should not be an empty array", resp.getProfileResults().size(), not(0)); for (Map.Entry> shardResult : resp.getProfileResults().entrySet()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) { @@ -450,6 +456,7 @@ public class QueryProfilerIT extends ESIntegTestCase { .execute().actionGet(); assertNotNull("Profile response element should not be null", resp.getProfileResults()); + assertThat("Profile response should not be an empty array", resp.getProfileResults().size(), not(0)); for (Map.Entry> shardResult : resp.getProfileResults().entrySet()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) { @@ -495,6 +502,7 @@ public class QueryProfilerIT extends ESIntegTestCase { .execute().actionGet(); assertNotNull("Profile response element should not be null", resp.getProfileResults()); + assertThat("Profile response should not be an empty array", resp.getProfileResults().size(), not(0)); for (Map.Entry> shardResult : resp.getProfileResults().entrySet()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) { @@ -549,6 +557,7 @@ public class QueryProfilerIT extends ESIntegTestCase { } assertNotNull("Profile response element should not be null", resp.getProfileResults()); + assertThat("Profile response should not be an empty array", resp.getProfileResults().size(), not(0)); for (Map.Entry> shardResult : resp.getProfileResults().entrySet()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) {