[TEST] Assert that put mappings requests are acked in GeoMappingTests.

This commit is contained in:
Adrien Grand 2014-08-06 11:55:00 +02:00
parent e7f1aa4f4f
commit 584d2c32dd
1 changed files with 6 additions and 4 deletions

View File

@ -29,10 +29,12 @@ import org.elasticsearch.test.ElasticsearchIntegrationTest;
import java.util.Map;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
public class GeoMappingTests extends ElasticsearchIntegrationTest {
public void testUpdatePrecision() throws Exception {
prepareCreate("test").addMapping("type1", XContentFactory.jsonBuilder().startObject()
assertAcked(prepareCreate("test").addMapping("type1", XContentFactory.jsonBuilder().startObject()
.startObject("type1")
.startObject("properties")
.startObject("pin")
@ -44,11 +46,11 @@ public class GeoMappingTests extends ElasticsearchIntegrationTest {
.endObject()
.endObject()
.endObject()
.endObject()).execute().actionGet();
.endObject()).get());
ensureYellow();
assertPrecision(new Distance(2, DistanceUnit.MILLIMETERS));
client().admin().indices().preparePutMapping("test").setType("type1").setSource(XContentFactory.jsonBuilder().startObject()
assertAcked(client().admin().indices().preparePutMapping("test").setType("type1").setSource(XContentFactory.jsonBuilder().startObject()
.startObject("type1")
.startObject("properties")
.startObject("pin")
@ -60,7 +62,7 @@ public class GeoMappingTests extends ElasticsearchIntegrationTest {
.endObject()
.endObject()
.endObject()
.endObject()).execute().actionGet();
.endObject()).get());
assertPrecision(new Distance(11, DistanceUnit.METERS));
}