Tests: Add more logging to SearchPreferenceTests so that we can know which preference is failing.
This commit is contained in:
parent
ade3881152
commit
365a324fc5
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue