in src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java [123:143]
public void testRecursiveInfinityTooDeep() throws IOException {
final Map<String, String> props = new HashMap<String, String>();
for (int i = 0; i < 20; i++) {
props.put("a" + i + "/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s", "yes");
}
final String url = testClient.createNode(postUrl, props);
final String json = getContent(url + ".infinity.json", CONTENT_TYPE_JSON, null, 300);
log.info("Url: {}", url);
log.info("postUrl: {}", postUrl);
// Get the resource url. (everything after the port)
// We skip http://localhost:8080/org.apache.sling.launchpad.testing-6-SNAPSHOT/
// or http://localhost:8080/
String resourceUrl = url;
final int toSkip = resourceUrl.contains("/org.apache.sling.launchpad") ? 4 : 3;
for (int i = toSkip; i > 0; i--) {
resourceUrl = resourceUrl.substring(resourceUrl.indexOf("/") + 1);
}
for (int i = 10; i >= 0; i--) {
assertJavascript("/" + resourceUrl + "." + i + ".json", json, "out.print(data[" + (10 - i) + "])");
}
}