Merge branch 'master' into wildcard_imports

This commit is contained in:
Ryan Ernst 2015-12-18 13:18:08 -08:00
commit beec7ca9db
3 changed files with 12 additions and 2 deletions

View File

@ -50,7 +50,7 @@ public class AntTask extends DefaultTask {
// remove existing loggers, we add our own // remove existing loggers, we add our own
List<BuildLogger> toRemove = new ArrayList<>(); List<BuildLogger> toRemove = new ArrayList<>();
for (BuildListener listener : ant.project.getBuildListeners()) { for (BuildListener listener : ant.project.getBuildListeners()) {
if (l instanceof BuildLogger) { if (listener instanceof BuildLogger) {
toRemove.add(listener); toRemove.add(listener);
} }
} }

View File

@ -66,8 +66,9 @@ public final class InternalProfileShardResults implements Writeable<InternalProf
ProfileShardResult result = new ProfileShardResult(in); ProfileShardResult result = new ProfileShardResult(in);
shardResult.add(result); shardResult.add(result);
} }
shardResults.put(key, shardResult); shardResults.put(key, Collections.unmodifiableList(shardResult));
} }
shardResults = Collections.unmodifiableMap(shardResults);
} }
public Map<String, List<ProfileShardResult>> getShardResults() { public Map<String, List<ProfileShardResult>> getShardResults() {

View File

@ -81,6 +81,7 @@ public class QueryProfilerIT extends ESIntegTestCase {
.execute().actionGet(); .execute().actionGet();
assertNotNull("Profile response element should not be null", resp.getProfileResults()); 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 (Map.Entry<String, List<ProfileShardResult>> shard : resp.getProfileResults().entrySet()) {
for (ProfileShardResult searchProfiles : shard.getValue()) { for (ProfileShardResult searchProfiles : shard.getValue()) {
for (ProfileResult result : searchProfiles.getQueryResults()) { for (ProfileResult result : searchProfiles.getQueryResults()) {
@ -203,6 +204,7 @@ public class QueryProfilerIT extends ESIntegTestCase {
Map<String, List<ProfileShardResult>> p = resp.getProfileResults(); Map<String, List<ProfileShardResult>> p = resp.getProfileResults();
assertNotNull(p); 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 (Map.Entry<String, List<ProfileShardResult>> shardResult : resp.getProfileResults().entrySet()) {
for (ProfileShardResult searchProfiles : shardResult.getValue()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) {
@ -248,6 +250,7 @@ public class QueryProfilerIT extends ESIntegTestCase {
Map<String, List<ProfileShardResult>> p = resp.getProfileResults(); Map<String, List<ProfileShardResult>> p = resp.getProfileResults();
assertNotNull(p); 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 (Map.Entry<String, List<ProfileShardResult>> shardResult : resp.getProfileResults().entrySet()) {
for (ProfileShardResult searchProfiles : shardResult.getValue()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) {
@ -315,6 +318,7 @@ public class QueryProfilerIT extends ESIntegTestCase {
.execute().actionGet(); .execute().actionGet();
assertNotNull("Profile response element should not be null", resp.getProfileResults()); 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 (Map.Entry<String, List<ProfileShardResult>> shardResult : resp.getProfileResults().entrySet()) {
for (ProfileShardResult searchProfiles : shardResult.getValue()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) {
@ -366,6 +370,7 @@ public class QueryProfilerIT extends ESIntegTestCase {
.execute().actionGet(); .execute().actionGet();
assertNotNull("Profile response element should not be null", resp.getProfileResults()); 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 (Map.Entry<String, List<ProfileShardResult>> shardResult : resp.getProfileResults().entrySet()) {
for (ProfileShardResult searchProfiles : shardResult.getValue()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) {
@ -412,6 +417,7 @@ public class QueryProfilerIT extends ESIntegTestCase {
.execute().actionGet(); .execute().actionGet();
assertNotNull("Profile response element should not be null", resp.getProfileResults()); 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 (Map.Entry<String, List<ProfileShardResult>> shardResult : resp.getProfileResults().entrySet()) {
for (ProfileShardResult searchProfiles : shardResult.getValue()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) {
@ -458,6 +464,7 @@ public class QueryProfilerIT extends ESIntegTestCase {
.execute().actionGet(); .execute().actionGet();
assertNotNull("Profile response element should not be null", resp.getProfileResults()); 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 (Map.Entry<String, List<ProfileShardResult>> shardResult : resp.getProfileResults().entrySet()) {
for (ProfileShardResult searchProfiles : shardResult.getValue()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) {
@ -503,6 +510,7 @@ public class QueryProfilerIT extends ESIntegTestCase {
.execute().actionGet(); .execute().actionGet();
assertNotNull("Profile response element should not be null", resp.getProfileResults()); 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 (Map.Entry<String, List<ProfileShardResult>> shardResult : resp.getProfileResults().entrySet()) {
for (ProfileShardResult searchProfiles : shardResult.getValue()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) {
@ -557,6 +565,7 @@ public class QueryProfilerIT extends ESIntegTestCase {
} }
assertNotNull("Profile response element should not be null", resp.getProfileResults()); 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 (Map.Entry<String, List<ProfileShardResult>> shardResult : resp.getProfileResults().entrySet()) {
for (ProfileShardResult searchProfiles : shardResult.getValue()) { for (ProfileShardResult searchProfiles : shardResult.getValue()) {