Skip to content

Commit 7cd354a

Browse files
jpountzareek
authored andcommitted
[TEST] Assert that put mappings requests are acked in GeoMappingTests.
1 parent c38252d commit 7cd354a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/test/java/org/elasticsearch/index/mapper/geo/GeoMappingTests.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@
2929

3030
import java.util.Map;
3131

32+
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
33+
3234
public class GeoMappingTests extends ElasticsearchIntegrationTest {
3335

3436
public void testUpdatePrecision() throws Exception {
35-
prepareCreate("test").addMapping("type1", XContentFactory.jsonBuilder().startObject()
37+
assertAcked(prepareCreate("test").addMapping("type1", XContentFactory.jsonBuilder().startObject()
3638
.startObject("type1")
3739
.startObject("properties")
3840
.startObject("pin")
@@ -44,11 +46,11 @@ public void testUpdatePrecision() throws Exception {
4446
.endObject()
4547
.endObject()
4648
.endObject()
47-
.endObject()).execute().actionGet();
49+
.endObject()).get());
4850
ensureYellow();
4951
assertPrecision(new Distance(2, DistanceUnit.MILLIMETERS));
5052

51-
client().admin().indices().preparePutMapping("test").setType("type1").setSource(XContentFactory.jsonBuilder().startObject()
53+
assertAcked(client().admin().indices().preparePutMapping("test").setType("type1").setSource(XContentFactory.jsonBuilder().startObject()
5254
.startObject("type1")
5355
.startObject("properties")
5456
.startObject("pin")
@@ -60,7 +62,7 @@ public void testUpdatePrecision() throws Exception {
6062
.endObject()
6163
.endObject()
6264
.endObject()
63-
.endObject()).execute().actionGet();
65+
.endObject()).get());
6466

6567
assertPrecision(new Distance(11, DistanceUnit.METERS));
6668
}

0 commit comments

Comments
 (0)