|
26 | 26 | import org.elasticsearch.action.admin.indices.stats.IndicesStatsResponse; |
27 | 27 | import org.elasticsearch.action.delete.DeleteResponse; |
28 | 28 | import org.elasticsearch.action.get.GetResponse; |
| 29 | +import org.elasticsearch.action.index.IndexResponse; |
29 | 30 | import org.elasticsearch.action.search.SearchRequestBuilder; |
30 | 31 | import org.elasticsearch.action.search.SearchResponse; |
31 | 32 | import org.elasticsearch.action.search.SearchType; |
@@ -1216,7 +1217,7 @@ public void testNestedSortingWithNestedFilterAsFilter() throws Exception { |
1216 | 1217 | .endObject() |
1217 | 1218 | .endObject().endObject())); |
1218 | 1219 |
|
1219 | | - client().prepareIndex("test", "type", "1").setSource(jsonBuilder().startObject() |
| 1220 | + IndexResponse indexResponse1 = client().prepareIndex("test", "type", "1").setSource(jsonBuilder().startObject() |
1220 | 1221 | .field("officelocation", "gendale") |
1221 | 1222 | .startArray("users") |
1222 | 1223 | .startObject() |
@@ -1263,8 +1264,9 @@ public void testNestedSortingWithNestedFilterAsFilter() throws Exception { |
1263 | 1264 | .endObject() |
1264 | 1265 | .endArray() |
1265 | 1266 | .endObject()).get(); |
| 1267 | + assertTrue(indexResponse1.getShardInfo().getSuccessful() > 0); |
1266 | 1268 |
|
1267 | | - client().prepareIndex("test", "type", "2").setSource(jsonBuilder().startObject() |
| 1269 | + IndexResponse indexResponse2 = client().prepareIndex("test", "type", "2").setSource(jsonBuilder().startObject() |
1268 | 1270 | .field("officelocation", "gendale") |
1269 | 1271 | .startArray("users") |
1270 | 1272 | .startObject() |
@@ -1311,6 +1313,7 @@ public void testNestedSortingWithNestedFilterAsFilter() throws Exception { |
1311 | 1313 | .endObject() |
1312 | 1314 | .endArray() |
1313 | 1315 | .endObject()).get(); |
| 1316 | + assertTrue(indexResponse2.getShardInfo().getSuccessful() > 0); |
1314 | 1317 | refresh(); |
1315 | 1318 |
|
1316 | 1319 | SearchResponse searchResponse = client().prepareSearch("test") |
|
0 commit comments