[TEST] Check length of profiled results in tests
This commit is contained in:
parent
41139c6b15
commit
4700cb9409
|
@ -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<String, List<ProfileShardResult>> shard : resp.getProfileResults().entrySet()) {
|
||||
for (ProfileShardResult searchProfiles : shard.getValue()) {
|
||||
for (ProfileResult result : searchProfiles.getQueryResults()) {
|
||||
|
@ -195,6 +196,7 @@ public class QueryProfilerIT extends ESIntegTestCase {
|
|||
|
||||
Map<String, List<ProfileShardResult>> p = resp.getProfileResults();
|
||||
assertNotNull(p);
|
||||
assertThat("Profile response should not be an empty array", resp.getProfileResults().size(), not(0));
|
||||
|
||||
for (Map.Entry<String, List<ProfileShardResult>> shardResult : resp.getProfileResults().entrySet()) {
|
||||
for (ProfileShardResult searchProfiles : shardResult.getValue()) {
|
||||
|
@ -240,6 +242,7 @@ public class QueryProfilerIT extends ESIntegTestCase {
|
|||
|
||||
Map<String, List<ProfileShardResult>> p = resp.getProfileResults();
|
||||
assertNotNull(p);
|
||||
assertThat("Profile response should not be an empty array", resp.getProfileResults().size(), not(0));
|
||||
|
||||
for (Map.Entry<String, List<ProfileShardResult>> 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<String, List<ProfileShardResult>> 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<String, List<ProfileShardResult>> 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<String, List<ProfileShardResult>> 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<String, List<ProfileShardResult>> 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<String, List<ProfileShardResult>> 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<String, List<ProfileShardResult>> shardResult : resp.getProfileResults().entrySet()) {
|
||||
for (ProfileShardResult searchProfiles : shardResult.getValue()) {
|
||||
|
|
Loading…
Reference in New Issue