Test: make sure mappings are on all shards to prevent false test failures
This commit is contained in:
parent
1a09e7180a
commit
5335e3d22d
|
@ -2456,6 +2456,10 @@ public class SimpleQueryTests extends ElasticsearchIntegrationTest {
|
|||
|
||||
refresh();
|
||||
|
||||
// Ensure all shards have our mappings, otherwise we can sometimes fail to hit the expected exceptions below, because some shards
|
||||
// will succeed in running a query (that returns 0 hits) instead of throwing the expected exception:
|
||||
waitForConcreteMappingsOnAll("test", "type1", "date", "num");
|
||||
|
||||
SearchResponse searchResponse = client().prepareSearch("test")
|
||||
.setQuery(QueryBuilders.rangeQuery("date").from("2014-01-01T00:00:00").to("2014-01-01T00:59:00"))
|
||||
.get();
|
||||
|
|
Loading…
Reference in New Issue