diff --git a/doc/en/user/source/extensions/mapml/index.rst b/doc/en/user/source/extensions/mapml/index.rst
index adda4c9c962..9232caa9517 100644
--- a/doc/en/user/source/extensions/mapml/index.rst
+++ b/doc/en/user/source/extensions/mapml/index.rst
@@ -209,31 +209,7 @@ in order to enable WMTS requests.
.. figure:: images/mapml_tile_caching_panel_ui.png
-Sharding Config
-^^^^^^^^^^^^^^^^
-
-The Sharding Config options are intended to allow for parallel access to tiles via different server names. The actual server names must be configured in the DNS to refer to either the same server or different servers with the same GeSserver layer configuration. In the example above, the mapML client would alternate between the servers a.geoserver.org, b.geoserver.org, and c.geoserver.org to access the map images. The values in the example above would result in the following MapML:
-
-.. code-block:: html
-
-
-
-
-
-
-
-
-
-
-**Enable Sharding**
- If Enable Sharding is checked, and values are provided for the Shard List and Shard Server Pattern fields, then a hidden shard list input will be included in the MapML.
-
-**Shard List**
- If Enable Sharding is checked, the Shard List should be populated with a comma-separated list of shard names which will be used to populate the shard data list element.
-
-**Shard Server Pattern**
- The Shard Server Pattern should be a valid DNS name including the special placeholder string {s} which will be replace with the Shard Names from the Shard List in requests to the server. This pattern should not include any slashes, the protocol string (http://) or the port number (:80), as these are all determined automatically from the URL used to access the MapML resource.
-
+Starting with version 2.26.x of GeoServer, Sharding support and related configuration has been removed.
Dimension Config
^^^^^^^^^^^^^^^^
diff --git a/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLConstants.java b/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLConstants.java
index 33bd62ce64a..91e20044508 100644
--- a/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLConstants.java
+++ b/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLConstants.java
@@ -78,12 +78,6 @@ public final class MapMLConstants {
/** MAPML_DIMENSION */
public static final String MAPML_MIME = MAPML_PREFIX + MIME;
- /** SHARD_LIST */
- public static final String SHARD_LIST = "shardList";
-
- /** ENABLE_SHARDING */
- public static final String ENABLE_SHARDING = "enableSharding";
-
/** USE_TILES */
public static final String USE_TILES = "useTiles";
@@ -96,9 +90,6 @@ public final class MapMLConstants {
/** USE_FEATURES */
public static final String USE_FEATURES = "useFeatures";
- /** SHARD_SERVER_PATTERN */
- public static final String SHARD_SERVER_PATTERN = "shardServerPattern";
-
/** LICENSE_TITLE */
public static final String LICENSE_TITLE = "mapml.licenseTitle";
diff --git a/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLDocumentBuilder.java b/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLDocumentBuilder.java
index aabff59fbaf..438a8088b41 100644
--- a/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLDocumentBuilder.java
+++ b/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLDocumentBuilder.java
@@ -50,7 +50,6 @@
import org.geoserver.mapml.xml.AxisType;
import org.geoserver.mapml.xml.Base;
import org.geoserver.mapml.xml.BodyContent;
-import org.geoserver.mapml.xml.Datalist;
import org.geoserver.mapml.xml.Extent;
import org.geoserver.mapml.xml.HeadContent;
import org.geoserver.mapml.xml.Input;
@@ -134,8 +133,6 @@ public class MapMLDocumentBuilder {
private String imageFormat = DEFAULT_MIME_TYPE;
private String baseUrl;
private String baseUrlPattern;
- private Boolean enableSharding;
- private String[] shardArray;
private ProjType projType;
private MetadataMap layerMeta;
private int height;
@@ -331,23 +328,6 @@ public void initialize() throws ServiceException {
imageFormat = (String) format.orElse(mapMLLayerMetadata.getDefaultMimeType());
baseUrl = ResponseUtils.baseURL(request);
baseUrlPattern = baseUrl;
- // handle shard config
- enableSharding = layerMeta.get("mapml.enableSharding", Boolean.class);
- String shardListString = layerMeta.get("mapml.shardList", String.class);
- shardArray = new String[0];
- if (shardListString != null) {
- shardArray = shardListString.split("[,\\s]+");
- }
- String shardServerPattern = layerMeta.get("mapml.shardServerPattern", String.class);
- if (shardArray.length < 1
- || shardServerPattern == null
- || shardServerPattern.isEmpty()) {
- enableSharding = Boolean.FALSE;
- }
- // if we have a valid shard config
- if (Boolean.TRUE.equals(enableSharding)) {
- baseUrlPattern = shardBaseURL(request, shardServerPattern);
- }
}
}
@@ -685,22 +665,6 @@ public String getTitle(PublishedInfo p, String defaultTitle) {
}
}
- /**
- * @param req the request
- * @param shardServerPattern the shard server pattern
- * @return the shard base URL
- */
- private String shardBaseURL(HttpServletRequest req, String shardServerPattern) {
- StringBuffer sb = new StringBuffer(req.getScheme());
- sb.append("://")
- .append(shardServerPattern)
- .append(":")
- .append(req.getServerPort())
- .append(req.getContextPath())
- .append("/");
- return sb.toString();
- }
-
/** Create and return MapML document */
private void prepareDocument() {
// build the mapML doc
@@ -998,26 +962,6 @@ private List prepareExtents() throws IOException {
extentZoomInput.setMax(maxZoom);
extentList.add(extentZoomInput);
- Input input;
- // shard list
- if (Boolean.TRUE.equals(enableSharding)) {
- input = new Input();
- input.setName("s");
- input.setType(InputType.HIDDEN);
- input.setShard("true");
- input.setList("servers");
- extentList.add(input);
- Datalist datalist = new Datalist();
- datalist.setId("servers");
- List options = datalist.getOptions();
- for (String sa : shardArray) {
- Option o = new Option();
- o.setValue(sa);
- options.add(o);
- }
- extentList.add(datalist);
- }
-
String dimension = layerMeta.get("mapml.dimension", String.class);
prepareExtentForLayer(mapMLLayerMetadata, dimension);
generateTemplatedLinks(mapMLLayerMetadata);
diff --git a/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerConfigurationPanel.html b/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerConfigurationPanel.html
index 2f0426d5dc6..262ba0a18f1 100644
--- a/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerConfigurationPanel.html
+++ b/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerConfigurationPanel.html
@@ -58,38 +58,6 @@
-
-
-
- Sharding Config
-
-
-
-
-
diff --git a/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerConfigurationPanel.java b/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerConfigurationPanel.java
index f7e9101040d..6fc31821e64 100644
--- a/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerConfigurationPanel.java
+++ b/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerConfigurationPanel.java
@@ -132,29 +132,6 @@ protected void onUpdate(AjaxRequestTarget target) {
});
add(useFeatures);
- // add the checkbox to enable sharding or not
- MapModel enableShardingModel =
- new MapModel<>(
- new PropertyModel(model, MapMLConstants.RESOURCE_METADATA),
- MapMLConstants.MAPML_PREFIX + MapMLConstants.ENABLE_SHARDING);
- CheckBox enableSharding = new CheckBox(MapMLConstants.ENABLE_SHARDING, enableShardingModel);
- add(enableSharding);
-
- MapModel shardListModel =
- new MapModel<>(
- new PropertyModel(model, MapMLConstants.RESOURCE_METADATA),
- MapMLConstants.MAPML_PREFIX + MapMLConstants.SHARD_LIST);
- TextField shardList = new TextField<>(MapMLConstants.SHARD_LIST, shardListModel);
- add(shardList);
-
- MapModel shardServerPatternModel =
- new MapModel<>(
- new PropertyModel(model, MapMLConstants.RESOURCE_METADATA),
- MapMLConstants.MAPML_PREFIX + MapMLConstants.SHARD_SERVER_PATTERN);
- TextField shardServerPattern =
- new TextField<>(MapMLConstants.SHARD_SERVER_PATTERN, shardServerPatternModel);
- add(shardServerPattern);
-
MapModel dimensionModel =
new MapModel<>(
new PropertyModel(model, MapMLConstants.RESOURCE_METADATA),
diff --git a/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerGroupConfigurationPanel.html b/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerGroupConfigurationPanel.html
index 1ab2d05c414..a8b17f72c40 100644
--- a/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerGroupConfigurationPanel.html
+++ b/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerGroupConfigurationPanel.html
@@ -35,29 +35,6 @@ MapML Settings
-
-
-
- Sharding Config
-
-
-
-
-
diff --git a/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerGroupConfigurationPanel.java b/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerGroupConfigurationPanel.java
index baf82580a12..088644ce42f 100644
--- a/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerGroupConfigurationPanel.java
+++ b/src/extension/mapml/src/main/java/org/geoserver/mapml/MapMLLayerGroupConfigurationPanel.java
@@ -74,26 +74,6 @@ protected void onUpdate(AjaxRequestTarget ajaxRequestTarget) {
});
add(useTiles);
- // add the checkbox to enable sharding or not
- MapModel enableShardingModel =
- new MapModel<>(
- new PropertyModel(model, METADATA), "mapml.enableSharding");
- CheckBox enableSharding = new CheckBox("enableSharding", enableShardingModel);
- add(enableSharding);
-
- MapModel shardListModel =
- new MapModel<>(new PropertyModel(model, METADATA), "mapml.shardList");
- TextField shardList = new TextField<>("shardList", shardListModel);
- add(shardList);
-
- MapModel shardServerPatternModel =
- new MapModel<>(
- new PropertyModel(model, METADATA),
- "mapml.shardServerPattern");
- TextField shardServerPattern =
- new TextField<>("shardServerPattern", shardServerPatternModel);
- add(shardServerPattern);
-
MapModel mimeModel =
new MapModel<>(
new PropertyModel(model, METADATA), MapMLConstants.MAPML_MIME);
diff --git a/src/extension/mapml/src/main/java/org/geoserver/mapml/xml/Input.java b/src/extension/mapml/src/main/java/org/geoserver/mapml/xml/Input.java
index 14c32c88665..ae861e0a605 100644
--- a/src/extension/mapml/src/main/java/org/geoserver/mapml/xml/Input.java
+++ b/src/extension/mapml/src/main/java/org/geoserver/mapml/xml/Input.java
@@ -28,7 +28,6 @@
* <attribute name="type" use="required" type="{}inputType" />
* <attribute name="value" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
* <attribute name="rel" type="{}inputRelType" />
- * <attribute name="shard" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
* <attribute name="list" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
* <attribute name="position" type="{}positionType" />
* <attribute name="axis" type="{}axisType" />
@@ -61,10 +60,6 @@ public class Input {
@XmlAttribute(name = "rel")
protected InputRelType rel;
- @XmlAttribute(name = "shard")
- @XmlSchemaType(name = "anySimpleType")
- protected String shard;
-
@XmlAttribute(name = "list")
@XmlSchemaType(name = "anySimpleType")
protected String list;
@@ -163,24 +158,6 @@ public void setRel(InputRelType value) {
this.rel = value;
}
- /**
- * Gets the value of the shard property.
- *
- * @return possible object is {@link String }
- */
- public String getShard() {
- return shard;
- }
-
- /**
- * Sets the value of the shard property.
- *
- * @param value allowed object is {@link String }
- */
- public void setShard(String value) {
- this.shard = value;
- }
-
/**
* Gets the value of the list property.
*
diff --git a/src/extension/mapml/src/main/resources/GeoServerApplication.properties b/src/extension/mapml/src/main/resources/GeoServerApplication.properties
index 7b4e6bd30b9..431dce842d2 100644
--- a/src/extension/mapml/src/main/resources/GeoServerApplication.properties
+++ b/src/extension/mapml/src/main/resources/GeoServerApplication.properties
@@ -17,10 +17,6 @@ MapMLLayerConfigurationPanel.mapmlTileSection=Tile Settings
MapMLLayerConfigurationPanel.mapmlVectorSection=Vector Settings
MapMLLayerConfigurationPanel.mapmlUseTiles=Use Tiles
MapMLLayerConfigurationPanel.mapmlUseFeatures=Use Features
-MapMLLayerConfigurationPanel.mapmlShardSection=Sharding Config
-MapMLLayerConfigurationPanel.mapmlEnableSharding=Enable Sharding
-MapMLLayerConfigurationPanel.mapmlShardList=Shard List (comma separated)
-MapMLLayerConfigurationPanel.mapmlShardServerPattern=Shard Server Pattern (include {s} as shard placeholder)
MapMLLayerConfigurationPanel.mapmlDimensionSection=Dimension Config
MapMLLayerConfigurationPanel.mapmlDefaultMimeSection=Default Mime Type Config
MapMLLayerConfigurationPanel.mapmlDimension=Dimension
@@ -37,10 +33,6 @@ MapMLLayerGroupConfigurationPanel.mapmlTileSection=Tile Settings
MapMLLayerGroupConfigurationPanel.mapmlVectorSection=Vector Settings
MapMLLayerGroupConfigurationPanel.mapmlUseFeatures=Use Features
MapMLLayerGroupConfigurationPanel.mapmlUseTiles=Use Tiles
-MapMLLayerGroupConfigurationPanel.mapmlShardSection=Sharding Config
-MapMLLayerGroupConfigurationPanel.mapmlEnableSharding=Enable Sharding
-MapMLLayerGroupConfigurationPanel.mapmlShardList=Shard List (comma separated)
-MapMLLayerGroupConfigurationPanel.mapmlShardServerPattern=Shard Server Pattern (include {s} as shard placeholder)
MapMLLayerGroupConfigurationPanel.mapmlDefaultMimeSection=Default Mime Type Config
MapMLLayerGroupConfigurationPanel.mapmlDefaultMime=Default Mime Type
MapMLAdminPanel.title=MapML Settings
diff --git a/src/extension/mapml/src/main/resources/GeoServerApplication_fr.properties b/src/extension/mapml/src/main/resources/GeoServerApplication_fr.properties
index daa1845e006..9b459ef8acc 100644
--- a/src/extension/mapml/src/main/resources/GeoServerApplication_fr.properties
+++ b/src/extension/mapml/src/main/resources/GeoServerApplication_fr.properties
@@ -17,10 +17,6 @@ MapMLLayerConfigurationPanel.mapmlLicenseLink=Lien de licence
MapMLLayerConfigurationPanel.mapmlTileSection=Paramètres des tuiles
MapMLLayerConfigurationPanel.mapmlVectorSection=Paramètres vectoriels
MapMLLayerConfigurationPanel.mapmlUseTiles=Utiliser des tuiles
-MapMLLayerConfigurationPanel.mapmlShardSection=Configuration du sharding
-MapMLLayerConfigurationPanel.mapmlEnableSharding=Activer le sharding
-MapMLLayerConfigurationPanel.mapmlShardList=Liste des shards (séparés par des virgules)
-MapMLLayerConfigurationPanel.mapmlShardServerPattern=Schéma des serveurs shard (inclure {s} comme remplaçant de shard)
MapMLLayerConfigurationPanel.mapmlDimensionSection=Configuration des dimensions
MapMLLayerConfigurationPanel.mapmlDimension=Dimension
MapMLLayerConfigurationPanel.dimension.nullValid=Aucun
@@ -34,10 +30,6 @@ MapMLLayerGroupConfigurationPanel.mapmlLicenseLink=Lien de licence
MapMLLayerGroupConfigurationPanel.mapmlTileSection=Paramètres des tuiles
MapMLLayerGroupConfigurationPanel.mapmlVectorSection=Paramètres vectoriels
MapMLLayerGroupConfigurationPanel.mapmlUseTiles=Utiliser des tuiles
-MapMLLayerGroupConfigurationPanel.mapmlShardSection=Configuration du sharding
-MapMLLayerGroupConfigurationPanel.mapmlEnableSharding=Activer le sharding
-MapMLLayerGroupConfigurationPanel.mapmlShardList=Liste des shards (séparés par des virgules)
-MapMLLayerGroupConfigurationPanel.mapmlShardServerPattern=Sch\u00E9ma des serveurs shard (inclure {s} comme rempla\u00E7ant du shard)
MapMLAdminPanel.title=MapML Paramètres
MapMLAdminPanel.mapml=MapML Paramètres
MapMLAdminPanel.multiextent=Représenter les requêtes multicouches sous forme de plusieurs éléments
diff --git a/src/extension/mapml/src/main/resources/GeoServerApplication_ko.properties b/src/extension/mapml/src/main/resources/GeoServerApplication_ko.properties
index 889d63fd058..4780f6b8ea4 100644
--- a/src/extension/mapml/src/main/resources/GeoServerApplication_ko.properties
+++ b/src/extension/mapml/src/main/resources/GeoServerApplication_ko.properties
@@ -22,10 +22,6 @@ MapMLLayerConfigurationPanel.mapmlLicenseTitle=\ub77c\uc774\uc120\uc2a4 \uc81c\u
MapMLLayerConfigurationPanel.mapmlLicenseLink=\ub77c\uc774\uc120\uc2a4 \ub9c1\ud06c
MapMLLayerConfigurationPanel.mapmlTileSection=\ud0c0\uc77c \uc124\uc815
MapMLLayerConfigurationPanel.mapmlUseTiles=\ud0c0\uc77c \uc0ac\uc6a9
-MapMLLayerConfigurationPanel.mapmlShardSection=\uc0e4\ub529 \uad6c\uc131
-MapMLLayerConfigurationPanel.mapmlEnableSharding=\uc0e4\ub529 \ud65c\uc131\ud654
-MapMLLayerConfigurationPanel.mapmlShardList=\uc0e4\ub4dc \ubaa9\ub85d(\uc27c\ud45c\ub85c \uad6c\ubd84)
-MapMLLayerConfigurationPanel.mapmlShardServerPattern=\uc0e4\ub4dc \uc11c\ubc84 \ud328\ud134({s}\uc744 \uc0e4\ub4dc \uc790\ub9ac \ud45c\uc2dc\uc790\ub85c \ud3ec\ud568)
MapMLLayerConfigurationPanel.mapmlDimensionSection=\ucc28\uc6d0 \uad6c\uc131
MapMLLayerConfigurationPanel.mapmlDimension=\ucc28\uc6d0
MapMLLayerConfigurationPanel.dimension.nullValid=\uc5c6\uc74c
@@ -39,7 +35,3 @@ MapMLLayerGroupConfigurationPanel.mapmlLicenseTitle=\ub77c\uc774\uc120\uc2a4 \uc
MapMLLayerGroupConfigurationPanel.mapmlLicenseLink=\ub77c\uc774\uc120\uc2a4 \ub9c1\ud06c
MapMLLayerGroupConfigurationPanel.mapmlTileSection=\ud0c0\uc77c \uc124\uc815
MapMLLayerGroupConfigurationPanel.mapmlUseTiles=\ud0c0\uc77c \uc0ac\uc6a9
-MapMLLayerGroupConfigurationPanel.mapmlShardSection=\uc0e4\ub529 \uad6c\uc131
-MapMLLayerGroupConfigurationPanel.mapmlEnableSharding=\uc0e4\ub529 \ud65c\uc131\ud654
-MapMLLayerGroupConfigurationPanel.mapmlShardList=\uc0e4\ub4dc \ubaa9\ub85d(\uc27c\ud45c\ub85c \uad6c\ubd84)
-MapMLLayerGroupConfigurationPanel.mapmlShardServerPattern=\uc0e4\ub4dc \uc11c\ubc84 \ud328\ud134({s}\uc744 \uc0e4\ub4dc \uc790\ub9ac \ud45c\uc2dc\uc790\ub85c \ud3ec\ud568)
diff --git a/src/extension/mapml/src/main/resources/GeoServerApplication_ro.properties b/src/extension/mapml/src/main/resources/GeoServerApplication_ro.properties
index 41e642a3962..914e29d5b85 100644
--- a/src/extension/mapml/src/main/resources/GeoServerApplication_ro.properties
+++ b/src/extension/mapml/src/main/resources/GeoServerApplication_ro.properties
@@ -22,10 +22,6 @@ MapMLPreviewLink.title=MapML
# MapMLLayerConfigurationPanel.mapmlLicenseLink=License Link
# MapMLLayerConfigurationPanel.mapmlTileSection=Tile Settings
# MapMLLayerConfigurationPanel.mapmlUseTiles=Use Tiles
-# MapMLLayerConfigurationPanel.mapmlShardSection=Sharding Config
-# MapMLLayerConfigurationPanel.mapmlEnableSharding=Enable Sharding
-# MapMLLayerConfigurationPanel.mapmlShardList=Shard List (comma separated)
-# MapMLLayerConfigurationPanel.mapmlShardServerPattern=Shard Server Pattern (include {s} as shard placeholder)
# MapMLLayerConfigurationPanel.mapmlDimensionSection=Dimension Config
MapMLLayerConfigurationPanel.mapmlDimension=Dimensiuni
MapMLLayerConfigurationPanel.dimension.nullValid=Nici unul
@@ -39,7 +35,3 @@ MapMLLayerConfigurationPanel.dimension.nullValid=Nici unul
# MapMLLayerGroupConfigurationPanel.mapmlLicenseLink=License Link
# MapMLLayerGroupConfigurationPanel.mapmlTileSection=Tile Settings
# MapMLLayerGroupConfigurationPanel.mapmlUseTiles=Use Tiles
-# MapMLLayerGroupConfigurationPanel.mapmlShardSection=Sharding Config
-# MapMLLayerGroupConfigurationPanel.mapmlEnableSharding=Enable Sharding
-# MapMLLayerGroupConfigurationPanel.mapmlShardList=Shard List (comma separated)
-# MapMLLayerGroupConfigurationPanel.mapmlShardServerPattern=Shard Server Pattern (include {s} as shard placeholder)
diff --git a/src/extension/mapml/src/main/resources/schema/mapml.rnc b/src/extension/mapml/src/main/resources/schema/mapml.rnc
index 6fa75bf5415..a88dc1ea42d 100644
--- a/src/extension/mapml/src/main/resources/schema/mapml.rnc
+++ b/src/extension/mapml/src/main/resources/schema/mapml.rnc
@@ -44,7 +44,6 @@ inputs = (element input {
attribute type { "zoom" | "hidden" | "location" | "datetime" | "width" | "height" },
attribute value { text }?,
attribute rel { "map" | "tile" }?,
- attribute shard { text }?,
attribute list { text }?,
# position tokens are based on /composed from the set of keywords used for CSS object-position, but they are obviously unique tokesn and not combinable otherwise
# https://developer.mozilla.org/en-US/docs/Web/CSS/object-position
diff --git a/src/extension/mapml/src/main/resources/schema/mapml.xsd b/src/extension/mapml/src/main/resources/schema/mapml.xsd
index cb101434b12..3193a1657f0 100644
--- a/src/extension/mapml/src/main/resources/schema/mapml.xsd
+++ b/src/extension/mapml/src/main/resources/schema/mapml.xsd
@@ -182,7 +182,6 @@
-
diff --git a/src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLLayerConfigurationPanelTest.java b/src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLLayerConfigurationPanelTest.java
index 29664016919..9612ccb911d 100644
--- a/src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLLayerConfigurationPanelTest.java
+++ b/src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLLayerConfigurationPanelTest.java
@@ -80,9 +80,6 @@ public void testMapMLPanel() {
tester.assertModelValue("form:panel:licenseLink", null);
tester.assertModelValue("form:panel:useTiles", null);
tester.assertModelValue("form:panel:useFeatures", null);
- tester.assertModelValue("form:panel:enableSharding", null);
- tester.assertModelValue("form:panel:shardList", null);
- tester.assertModelValue("form:panel:shardServerPattern", null);
tester.assertModelValue("form:panel:dimension", null);
tester.assertModelValue("form:panel:featurecaptionattributes", null);
tester.assertModelValue("form:panel:featureCaptionTemplate", null);
@@ -91,10 +88,6 @@ public void testMapMLPanel() {
ft.setValue("panel:licenseLink", "https://example.org/mapml");
ft.setValue("panel:useTiles", true);
ft.setValue("panel:useFeatures", true);
- ft.setValue("panel:enableSharding", true);
- ft.setValue("panel:enableSharding", true);
- ft.setValue("panel:shardList", "a,b,c");
- ft.setValue("panel:shardServerPattern", "{s}");
// no dimension set up yet should not be able to select one...
try {
ft.select("panel:dimension", 0);
@@ -112,9 +105,6 @@ public void testMapMLPanel() {
tester.assertModelValue("form:panel:licenseLink", "https://example.org/mapml");
tester.assertModelValue("form:panel:useTiles", true);
tester.assertModelValue("form:panel:useFeatures", true);
- tester.assertModelValue("form:panel:enableSharding", true);
- tester.assertModelValue("form:panel:shardList", "a,b,c");
- tester.assertModelValue("form:panel:shardServerPattern", "{s}");
// tester.assertModelValue("form:panel:featurecaptionattributes", "[NAME]");
tester.assertModelValue("form:panel:featureCaptionTemplate", "This is a ${test}");
}
@@ -142,9 +132,6 @@ public void testMapMLPanelWithRasterData() {
tester.assertModelValue("form:panel:licenseLink", null);
tester.assertModelValue("form:panel:useTiles", null);
tester.assertModelValue("form:panel:useFeatures", null);
- tester.assertModelValue("form:panel:enableSharding", null);
- tester.assertModelValue("form:panel:shardList", null);
- tester.assertModelValue("form:panel:shardServerPattern", null);
tester.assertModelValue("form:panel:dimension", null);
tester.assertModelValue("form:panel:featurecaptionattributes", null);
tester.assertModelValue("form:panel:featureCaptionTemplate", null);
@@ -152,9 +139,6 @@ public void testMapMLPanelWithRasterData() {
ft.setValue("panel:licenseTitle", "A Fake Title");
ft.setValue("panel:licenseLink", "https://example.org/mapml");
ft.setValue("panel:useTiles", true);
- ft.setValue("panel:enableSharding", true);
- ft.setValue("panel:shardList", "a,b,c");
- ft.setValue("panel:shardServerPattern", "{s}");
ft.setValue("panel:featureCaptionTemplate", "This is a ${test}");
// no dimension set up yet should not be able to select one...
@@ -172,9 +156,6 @@ public void testMapMLPanelWithRasterData() {
tester.assertModelValue("form:panel:licenseTitle", "A Fake Title");
tester.assertModelValue("form:panel:licenseLink", "https://example.org/mapml");
tester.assertModelValue("form:panel:useTiles", true);
- tester.assertModelValue("form:panel:enableSharding", true);
- tester.assertModelValue("form:panel:shardList", "a,b,c");
- tester.assertModelValue("form:panel:shardServerPattern", "{s}");
// tester.assertModelValue("form:panel:featurecaptionattributes", "[BLUE_BAND]");
tester.assertModelValue("form:panel:featureCaptionTemplate", "This is the ${BLUE_BAND}");
}
diff --git a/src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLWMSTest.java b/src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLWMSTest.java
index 102af1df1f9..a247a82b963 100644
--- a/src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLWMSTest.java
+++ b/src/extension/mapml/src/test/java/org/geoserver/mapml/MapMLWMSTest.java
@@ -980,9 +980,10 @@ public void testNonExistentProjection() throws Exception {
}
@Test
- public void testShardingMapMLLayer() throws Exception {
-
- // set up mapml layer to useTiles
+ public void testLegacyShardingConfig() throws Exception {
+ // Although sharding support has been removed, test that everything is working fine
+ // and no configured sharding is being used even if it was configured (simulating
+ // an old layer configured in the past with sharding enabled)
Catalog catalog = getCatalog();
ResourceInfo layerMeta =
catalog.getLayerByName(MockData.ROAD_SEGMENTS.getLocalPart()).getResource();
@@ -1010,20 +1011,20 @@ public void testShardingMapMLLayer() throws Exception {
assertXpathEvaluatesTo("1", "count(//html:map-link[@rel='image'][@tref])", doc);
String url = xpath.evaluate("//html:map-link[@rel='image']/@tref", doc);
- assertTrue(url.startsWith("http://{s}.example.com"));
- assertXpathEvaluatesTo("1", "count(//html:map-datalist[@id='servers'])", doc);
+ assertFalse(url.startsWith("http://{s}.example.com"));
+ assertXpathEvaluatesTo("0", "count(//html:map-datalist[@id='servers'])", doc);
assertXpathEvaluatesTo(
- "1",
+ "0",
"count(//html:map-input[@list='servers'][@type='hidden'][@shard='true'][@name='s'])",
doc);
- assertXpathEvaluatesTo("3", "count(//html:map-datalist/map-option)", doc);
- assertXpathEvaluatesTo("1", "count(//html:map-datalist/map-option[@value='server1'])", doc);
- assertXpathEvaluatesTo("1", "count(//html:map-datalist/map-option[@value='server2'])", doc);
- assertXpathEvaluatesTo("1", "count(//html:map-datalist/map-option[@value='server3'])", doc);
+ assertXpathEvaluatesTo("0", "count(//html:map-datalist/map-option)", doc);
+ assertXpathEvaluatesTo("0", "count(//html:map-datalist/map-option[@value='server1'])", doc);
+ assertXpathEvaluatesTo("0", "count(//html:map-datalist/map-option[@value='server2'])", doc);
+ assertXpathEvaluatesTo("0", "count(//html:map-datalist/map-option[@value='server3'])", doc);
assertXpathEvaluatesTo("1", "count(//html:map-link[@rel='query'][@tref])", doc);
url = xpath.evaluate("//html:map-link[@rel='query']/@tref", doc);
- assertTrue(url.startsWith("http://{s}.example.com"));
+ assertFalse(url.startsWith("http://{s}.example.com"));
}
@Test