Skip to content

Commit 5c5e13a

Browse files
committed
[TEST] properly wait for mappings when needed
1 parent 5273410 commit 5c5e13a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public void simpleGetFieldMappingsWithDefaults() throws Exception {
133133

134134
client().prepareIndex("test", "type", "1").setSource("num", 1).get();
135135
ensureYellow();
136+
waitForConcreteMappingsOnAll("test", "type", "num"); // for num, we need to wait...
136137

137138
GetFieldMappingsResponse response = client().admin().indices().prepareGetFieldMappings().setFields("num", "field1", "subfield").includeDefaults(true).get();
138139

src/test/java/org/elasticsearch/percolator/PercolatorTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,6 +1756,7 @@ public void testUpdateMappingDynamicallyWhilePercolating() throws Exception {
17561756
assertMatchCount(response, 0l);
17571757
assertThat(response.getMatches(), arrayWithSize(0));
17581758

1759+
ensureYellow("test"); // wait for at least primaries allocations so concretely allocated on it
17591760
waitForConcreteMappingsOnAll("test", "type1", "field1", "field2");
17601761

17611762
GetMappingsResponse mappingsResponse = client().admin().indices().prepareGetMappings("test").get();

0 commit comments

Comments
 (0)