Skip to content

Commit

Permalink
remove types from more IT tests
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
  • Loading branch information
nknize committed Mar 4, 2022
1 parent 6cf60d9 commit e7b59ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,16 @@ public void testDeleteCreateInOneBulk() throws Exception {
internalCluster().startMasterOnlyNode();
String dataNode = internalCluster().startDataOnlyNode();
assertFalse(client().admin().cluster().prepareHealth().setWaitForNodes("2").get().isTimedOut());
prepareCreate("test").setSettings(Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)).addMapping("type").get();
prepareCreate("test").setSettings(Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0))
.addMapping(MapperService.SINGLE_MAPPING_NAME)
.get();
ensureGreen("test");

// block none master node.
BlockClusterStateProcessing disruption = new BlockClusterStateProcessing(dataNode, random());
internalCluster().setDisruptionScheme(disruption);
logger.info("--> indexing a doc");
index("test", "type", "1");
index("test", MapperService.SINGLE_MAPPING_NAME, "1");
refresh();
disruption.startDisrupting();
logger.info("--> delete index and recreate it");
Expand Down Expand Up @@ -363,7 +365,7 @@ public void testDelayedMappingPropagationOnReplica() throws Exception {
final IndexService indexService = indicesService.indexServiceSafe(index);
assertNotNull(indexService);
final MapperService mapperService = indexService.mapperService();
DocumentMapper mapper = mapperService.documentMapper("type");
DocumentMapper mapper = mapperService.documentMapper(MapperService.SINGLE_MAPPING_NAME);
assertNotNull(mapper);
assertNotNull(mapper.mappers().getMapper("field"));
});
Expand All @@ -387,7 +389,7 @@ public void testDelayedMappingPropagationOnReplica() throws Exception {
final IndexService indexService = indicesService.indexServiceSafe(index);
assertNotNull(indexService);
final MapperService mapperService = indexService.mapperService();
DocumentMapper mapper = mapperService.documentMapper("type");
DocumentMapper mapper = mapperService.documentMapper(MapperService.SINGLE_MAPPING_NAME);
assertNotNull(mapper);
assertNotNull(mapper.mappers().getMapper("field2"));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ public void testShrinking() throws Exception {
.put("index.number_of_replicas", numberOfReplicas())
.put("index.routing_partition_size", partitionSize)
)
.addMapping("type", "{\"type\":{\"_routing\":{\"required\":true}}}", XContentType.JSON)
.addMapping(
MapperService.SINGLE_MAPPING_NAME,
"{\"" + MapperService.SINGLE_MAPPING_NAME + "\":{\"_routing\":{\"required\":true}}}",
XContentType.JSON
)
.execute()
.actionGet();
ensureGreen();
Expand Down

0 comments on commit e7b59ab

Please sign in to comment.