Add more debug info to SimpleDeleteMappingTests

This commit is contained in:
Simon Willnauer 2013-09-25 23:56:18 +02:00
parent 1644444a4f
commit 63fdbe9b9b
1 changed files with 5 additions and 0 deletions

View File

@ -51,6 +51,11 @@ public class SimpleDeleteMappingTests extends AbstractIntegrationTest {
}
ClusterState clusterState = client().admin().cluster().prepareState().execute().actionGet().getState();
if (!clusterState.metaData().index("test").mappings().containsKey("type1")) {
logger.info("mapping of type [{}] is not in the clusterstate version: [{}] localNode: [{}] nodes: [{}]", "type1",
clusterState.version(), clusterState.nodes().localNode(), clusterState.nodes().dataNodes().values());
logger.info("Current mappings in clusterstate: [{}]", clusterState.metaData().index("test").mappings().keySet());
}
assertThat(clusterState.metaData().index("test").mappings().containsKey("type1"), equalTo(true));
GetMappingsResponse mappingsResponse = client().admin().indices().prepareGetMappings("test").setTypes("type1").execute().actionGet();
assertThat(mappingsResponse.getMappings().get("test").get("type1"), notNullValue());