From 365a324fc51eb7d5b5bda8d2c889f149a8198b0a Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Mon, 3 Aug 2015 12:55:15 +0200 Subject: [PATCH] Tests: Add more logging to SearchPreferenceTests so that we can know which preference is failing. --- .../elasticsearch/search/preference/SearchPreferenceTests.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceTests.java b/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceTests.java index dc125558209..452e421ab8f 100644 --- a/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceTests.java +++ b/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceTests.java @@ -49,6 +49,7 @@ public class SearchPreferenceTests extends ElasticsearchIntegrationTest { client().admin().cluster().prepareHealth().setWaitForStatus(ClusterHealthStatus.RED).execute().actionGet(); String[] preferences = new String[] {"_primary", "_local", "_primary_first", "_prefer_node:somenode", "_prefer_node:server2"}; for (String pref : preferences) { + logger.info("--> Testing out preference={}", pref); SearchResponse searchResponse = client().prepareSearch().setSize(0).setPreference(pref).execute().actionGet(); assertThat(RestStatus.OK, equalTo(searchResponse.status())); assertThat(pref, searchResponse.getFailedShards(), greaterThanOrEqualTo(0));