[TEST] Fix SimpleDeleteMappingTests.
The failure was hard to reproduce but it looked to me like dynamic mapping updates were overriding the delete mappings request.
This commit is contained in:
parent
356349599f
commit
b0c21d751d
|
@ -23,17 +23,16 @@ import com.google.common.base.Predicate;
|
|||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse;
|
||||
import org.elasticsearch.action.count.CountResponse;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.MappingMetaData;
|
||||
import org.elasticsearch.common.collect.ImmutableOpenMap;
|
||||
import org.elasticsearch.test.ElasticsearchIntegrationTest;
|
||||
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -42,6 +41,7 @@ public class SimpleDeleteMappingTests extends ElasticsearchIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void simpleDeleteMapping() throws Exception {
|
||||
assertAcked(prepareCreate("test").addMapping("type1", "value", "type=string").execute().actionGet());
|
||||
for (int i = 0; i < 10; i++) {
|
||||
client().prepareIndex("test", "type1", Integer.toString(i)).setSource(jsonBuilder().startObject()
|
||||
.field("value", "test" + i)
|
||||
|
|
Loading…
Reference in New Issue