Search in sources :

Example 1 with ResourceResolverTestRequest

use of org.apache.sling.performance.ResourceResolverTestRequest in project sling by apache.

the class ResolveNonExistingWithManyAliasTest method runTest.

@PerformanceTest
public void runTest() throws Exception {
    String path = ResourceUtil.normalize(ResourceUtil.getParent(rootPath) + "/" + "testNonExistingAlias" + ".print.html");
    HttpServletRequest request = new ResourceResolverTestRequest(path);
    Resource res = resResolver.resolve(request, path);
    Assert.assertNotNull(res);
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) Resource(org.apache.sling.api.resource.Resource) ResourceResolverTestRequest(org.apache.sling.performance.ResourceResolverTestRequest) PerformanceTest(org.apache.sling.performance.annotation.PerformanceTest)

Example 2 with ResourceResolverTestRequest

use of org.apache.sling.performance.ResourceResolverTestRequest in project sling by apache.

the class ResolveNonExistingWithManyVanityPathTest method runTest.

@PerformanceTest
public void runTest() throws Exception {
    String path = ResourceUtil.normalize(ResourceUtil.getParent(rootPath) + "/" + "testNonExistingVanity" + ".print.html");
    HttpServletRequest request = new ResourceResolverTestRequest(path);
    Resource res = resResolver.resolve(request, path);
    Assert.assertNotNull(res);
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) Resource(org.apache.sling.api.resource.Resource) ResourceResolverTestRequest(org.apache.sling.performance.ResourceResolverTestRequest) PerformanceTest(org.apache.sling.performance.annotation.PerformanceTest)

Aggregations

HttpServletRequest (javax.servlet.http.HttpServletRequest)2 Resource (org.apache.sling.api.resource.Resource)2 ResourceResolverTestRequest (org.apache.sling.performance.ResourceResolverTestRequest)2 PerformanceTest (org.apache.sling.performance.annotation.PerformanceTest)2