SLING-3294 - Simplify Performance Test Creation
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1551896 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/base/src/main/java/org/apache/sling/performance/AbstractRepositoryTest.java b/base/src/main/java/org/apache/sling/performance/AbstractRepositoryTest.java
index ff542c5..4854bca 100644
--- a/base/src/main/java/org/apache/sling/performance/AbstractRepositoryTest.java
+++ b/base/src/main/java/org/apache/sling/performance/AbstractRepositoryTest.java
@@ -27,7 +27,14 @@
public abstract class AbstractRepositoryTest {
-
+
+ protected String testInstanceName;
+
+ public AbstractRepositoryTest(String testInstanceName) {
+ super();
+ this.testInstanceName = testInstanceName;
+ }
+
private static class ShutdownThread extends Thread {
@Override
public void run() {
@@ -80,5 +87,9 @@
}
return testRoot;
}
+
+ public String toString(){
+ return testInstanceName;
+ }
}
diff --git a/base/src/main/java/org/apache/sling/performance/FrameworkPerformanceMethod.java b/base/src/main/java/org/apache/sling/performance/FrameworkPerformanceMethod.java
index 36a0271..be28c78 100644
--- a/base/src/main/java/org/apache/sling/performance/FrameworkPerformanceMethod.java
+++ b/base/src/main/java/org/apache/sling/performance/FrameworkPerformanceMethod.java
@@ -177,7 +177,7 @@
}
if (statistics.getN() > 0) {
- ReportLogger.writeReport(this.performanceSuiteState.testSuiteName, testCaseName, this.target.getClass().getName(),
+ ReportLogger.writeReport(this.performanceSuiteState.testSuiteName, testCaseName, ((String )this.target.getClass().getMethod("toString", null).invoke(this.target, null)),
getMethod().getName(), statistics, ReportLogger.ReportType.TXT, reportLevel);
}
diff --git a/jcr-resource-2.0.10/src/test/java/org/apache/sling/performance/PerformanceTest.java b/jcr-resource-2.0.10/src/test/java/org/apache/sling/performance/PerformanceTest.java
index 04a9e68..8cff0e7 100644
--- a/jcr-resource-2.0.10/src/test/java/org/apache/sling/performance/PerformanceTest.java
+++ b/jcr-resource-2.0.10/src/test/java/org/apache/sling/performance/PerformanceTest.java
@@ -18,9 +18,7 @@
import javax.jcr.NamespaceRegistry;
import javax.jcr.Session;
-
import junitx.util.PrivateAccessor;
-
import org.apache.sling.api.SlingConstants;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.jcr.api.SlingRepository;
@@ -29,12 +27,8 @@
import org.apache.sling.jcr.resource.internal.helper.MapEntries;
import org.apache.sling.jcr.resource.internal.helper.Mapping;
import org.apache.sling.performance.annotation.PerformanceTestSuite;
-import org.apache.sling.performance.tests.ResolveNonExistingWith10000AliasTest;
-import org.apache.sling.performance.tests.ResolveNonExistingWith10000VanityPathTest;
-import org.apache.sling.performance.tests.ResolveNonExistingWith1000AliasTest;
-import org.apache.sling.performance.tests.ResolveNonExistingWith1000VanityPathTest;
-import org.apache.sling.performance.tests.ResolveNonExistingWith5000AliasTest;
-import org.apache.sling.performance.tests.ResolveNonExistingWith5000VanityPathTest;
+import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest;
+import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
import org.junit.runner.RunWith;
@@ -92,14 +86,13 @@
ParameterizedTestList testCenter = new ParameterizedTestList();
testCenter.setTestSuiteTitle("jcr.resource-2.0.10");
- testCenter.addTestObject(new ResolveNonExistingWith1000VanityPathTest(helper));
- testCenter.addTestObject(new ResolveNonExistingWith5000VanityPathTest(helper));
- testCenter.addTestObject(new ResolveNonExistingWith10000VanityPathTest(helper));
- //tests.add(new ResolveNonExistingWith30000VanityPathTest(helper));
- testCenter.addTestObject(new ResolveNonExistingWith1000AliasTest(helper));
- testCenter.addTestObject(new ResolveNonExistingWith5000AliasTest(helper));
- testCenter.addTestObject(new ResolveNonExistingWith10000AliasTest(helper));
- //tests.add(new ResolveNonExistingWith30000AliasTest(helper));
+ testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith1000VanityPathTest",helper, 100, 10));
+ testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith5000VanityPathTest",helper, 100, 50));
+ testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith10000VanityPathTest",helper, 100, 100));
+
+ testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWithManyAliasTest",helper, 1000));
+ testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith5000AliasTest",helper, 5000));
+ testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith10000AliasTest",helper, 10000));
return testCenter;
diff --git a/jcr-resource-2.1.0/src/test/java/org/apache/sling/performance/PerformanceTest.java b/jcr-resource-2.1.0/src/test/java/org/apache/sling/performance/PerformanceTest.java
index 228ff43..37d5a9a 100644
--- a/jcr-resource-2.1.0/src/test/java/org/apache/sling/performance/PerformanceTest.java
+++ b/jcr-resource-2.1.0/src/test/java/org/apache/sling/performance/PerformanceTest.java
@@ -16,7 +16,9 @@
*/
package org.apache.sling.performance;
-import static org.mockito.Mockito.*;
+import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.mock;
+
import javax.jcr.NamespaceRegistry;
import javax.jcr.Session;
import junitx.util.PrivateAccessor;
@@ -28,12 +30,8 @@
import org.apache.sling.jcr.resource.internal.helper.MapEntries;
import org.apache.sling.jcr.resource.internal.helper.Mapping;
import org.apache.sling.performance.annotation.PerformanceTestSuite;
-import org.apache.sling.performance.tests.ResolveNonExistingWith10000AliasTest;
-import org.apache.sling.performance.tests.ResolveNonExistingWith10000VanityPathTest;
-import org.apache.sling.performance.tests.ResolveNonExistingWith1000AliasTest;
-import org.apache.sling.performance.tests.ResolveNonExistingWith1000VanityPathTest;
-import org.apache.sling.performance.tests.ResolveNonExistingWith5000AliasTest;
-import org.apache.sling.performance.tests.ResolveNonExistingWith5000VanityPathTest;
+import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest;
+import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
import org.junit.runner.RunWith;
import org.osgi.framework.BundleContext;
import org.osgi.service.event.Event;
@@ -106,15 +104,13 @@
Helper helper = new Helper();
ParameterizedTestList testCenter = new ParameterizedTestList();
- testCenter.setTestSuiteTitle("jcr.resource-2.1.0");
- testCenter.addTestObject(new ResolveNonExistingWith1000VanityPathTest(helper));
- testCenter.addTestObject(new ResolveNonExistingWith5000VanityPathTest(helper));
- testCenter.addTestObject(new ResolveNonExistingWith10000VanityPathTest(helper));
- //tests.add(new ResolveNonExistingWith30000VanityPathTest(helper));
- testCenter.addTestObject(new ResolveNonExistingWith1000AliasTest(helper));
- testCenter.addTestObject(new ResolveNonExistingWith5000AliasTest(helper));
- testCenter.addTestObject(new ResolveNonExistingWith10000AliasTest(helper));
- //tests.add(new ResolveNonExistingWith30000AliasTest(helper));
+ testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith1000VanityPathTest",helper, 100, 10));
+ testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith5000VanityPathTest",helper, 100, 50));
+ testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith10000VanityPathTest",helper, 100, 100));
+
+ testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWithManyAliasTest",helper, 1000));
+ testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith5000AliasTest",helper, 5000));
+ testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith10000AliasTest",helper, 10000));
return testCenter;
}
diff --git a/jcr-resource-2.2.0/src/test/java/org/apache/sling/performance/PerformanceTest.java b/jcr-resource-2.2.0/src/test/java/org/apache/sling/performance/PerformanceTest.java
index d77f340..e502c49 100644
--- a/jcr-resource-2.2.0/src/test/java/org/apache/sling/performance/PerformanceTest.java
+++ b/jcr-resource-2.2.0/src/test/java/org/apache/sling/performance/PerformanceTest.java
@@ -32,12 +32,8 @@
import org.apache.sling.jcr.resource.JcrResourceConstants;
import org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory;
import org.apache.sling.performance.annotation.PerformanceTestSuite;
-import org.apache.sling.performance.tests.ResolveNonExistingWith10000AliasTest;
-import org.apache.sling.performance.tests.ResolveNonExistingWith10000VanityPathTest;
-import org.apache.sling.performance.tests.ResolveNonExistingWith1000AliasTest;
-import org.apache.sling.performance.tests.ResolveNonExistingWith1000VanityPathTest;
-import org.apache.sling.performance.tests.ResolveNonExistingWith5000AliasTest;
-import org.apache.sling.performance.tests.ResolveNonExistingWith5000VanityPathTest;
+import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest;
+import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
import org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator;
import org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl;
import org.apache.sling.resourceresolver.impl.mapping.MapEntries;
@@ -112,18 +108,18 @@
@PerformanceTestSuite
public ParameterizedTestList testPerformance() throws Exception {
Helper helper = new Helper();
-
+
ParameterizedTestList testCenter = new ParameterizedTestList();
testCenter.setTestSuiteTitle("jcr.resource-2.2.0");
- testCenter.addTestObject(new ResolveNonExistingWith1000VanityPathTest(helper));
- testCenter.addTestObject(new ResolveNonExistingWith5000VanityPathTest(helper));
- testCenter.addTestObject(new ResolveNonExistingWith10000VanityPathTest(helper));
- //tests.add(new ResolveNonExistingWith30000VanityPathTest(helper));
- testCenter.addTestObject(new ResolveNonExistingWith1000AliasTest(helper));
- testCenter.addTestObject(new ResolveNonExistingWith5000AliasTest(helper));
- testCenter.addTestObject(new ResolveNonExistingWith10000AliasTest(helper));
- //tests.add(new ResolveNonExistingWith30000AliasTest(helper));
+ testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith1000VanityPathTest",helper, 100, 10));
+ testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith5000VanityPathTest",helper, 100, 50));
+ testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith10000VanityPathTest",helper, 100, 100));
+
+ testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith1000AliasTest",helper, 1000));
+ testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith5000AliasTest",helper, 5000));
+ testCenter.addTestObject(new ResolveNonExistingWithManyAliasTest("ResolveNonExistingWith10000AliasTest",helper, 10000));
+
return testCenter;
}
}
diff --git a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000AliasTest.java b/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000AliasTest.java
deleted file mode 100644
index cacb68b..0000000
--- a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000AliasTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.performance.tests;
-
-import org.apache.sling.performance.TestHelper;
-import org.apache.sling.performance.annotation.PerformanceTest;
-
-public class ResolveNonExistingWith10000AliasTest extends ResolveNonExistingWithManyAliasTest {
-
- public ResolveNonExistingWith10000AliasTest(TestHelper helper) {
- super(helper, 10000);
- }
-
- @PerformanceTest
- public void resolveNonExistingWith10000AliasTest() throws Exception {
- super.runTest();
- }
-
-}
\ No newline at end of file
diff --git a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000VanityPathTest.java b/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000VanityPathTest.java
deleted file mode 100644
index b048aee..0000000
--- a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000VanityPathTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.performance.tests;
-
-import org.apache.sling.performance.TestHelper;
-import org.apache.sling.performance.annotation.PerformanceTest;
-
-public class ResolveNonExistingWith10000VanityPathTest extends ResolveNonExistingWithManyVanityPathTest {
-
- public ResolveNonExistingWith10000VanityPathTest(TestHelper helper) {
- super(helper, 100, 100);
- }
-
- @PerformanceTest
- public void resolveNonExistingWith10000VanityPathTest() throws Exception {
- super.runTest();
- }
-
-}
diff --git a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000AliasTest.java b/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000AliasTest.java
deleted file mode 100644
index b4405bb..0000000
--- a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000AliasTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.performance.tests;
-
-import org.apache.sling.performance.TestHelper;
-import org.apache.sling.performance.annotation.PerformanceTest;
-
-public class ResolveNonExistingWith1000AliasTest extends ResolveNonExistingWithManyAliasTest {
-
- public ResolveNonExistingWith1000AliasTest(TestHelper helper) {
- super(helper, 1000);
- }
-
- @PerformanceTest
- public void resolveNonExistingWith1000AliasTest() throws Exception {
- super.runTest();
- }
-}
diff --git a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000VanityPathTest.java b/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000VanityPathTest.java
deleted file mode 100644
index 8d03298..0000000
--- a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000VanityPathTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.performance.tests;
-
-import org.apache.sling.performance.TestHelper;
-import org.apache.sling.performance.annotation.PerformanceTest;
-
-public class ResolveNonExistingWith1000VanityPathTest extends ResolveNonExistingWithManyVanityPathTest {
-
- public ResolveNonExistingWith1000VanityPathTest(TestHelper helper) {
- super(helper, 100, 10);
- }
-
- @PerformanceTest
- public void resolveNonExistingWith1000VanityPathTest() throws Exception {
- super.runTest();
- }
-}
diff --git a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000AliasTest.java b/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000AliasTest.java
deleted file mode 100644
index 106a92a..0000000
--- a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000AliasTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.performance.tests;
-
-import org.apache.sling.performance.TestHelper;
-import org.apache.sling.performance.annotation.PerformanceTest;
-
-public class ResolveNonExistingWith30000AliasTest extends ResolveNonExistingWithManyAliasTest {
-
- public ResolveNonExistingWith30000AliasTest(TestHelper helper) {
- super(helper, 30000);
- }
-
- @PerformanceTest
- public void resolveNonExistingWith30000AliasTest() throws Exception {
- super.runTest();
- }
-
-}
\ No newline at end of file
diff --git a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000VanityPathTest.java b/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000VanityPathTest.java
deleted file mode 100644
index 4e84dd3..0000000
--- a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000VanityPathTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.performance.tests;
-
-import org.apache.sling.performance.TestHelper;
-import org.apache.sling.performance.annotation.PerformanceTest;
-
-public class ResolveNonExistingWith30000VanityPathTest extends ResolveNonExistingWithManyVanityPathTest {
-
- public ResolveNonExistingWith30000VanityPathTest(TestHelper helper) {
- super(helper, 300, 100);
- }
-
- @PerformanceTest
- public void resolveNonExistingWith30000VanityPathTest() throws Exception {
- super.runTest();
- }
-}
diff --git a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000AliasTest.java b/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000AliasTest.java
deleted file mode 100644
index 45e5091..0000000
--- a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000AliasTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.performance.tests;
-
-import org.apache.sling.performance.TestHelper;
-import org.apache.sling.performance.annotation.PerformanceTest;
-
-public class ResolveNonExistingWith5000AliasTest extends ResolveNonExistingWithManyAliasTest {
-
- public ResolveNonExistingWith5000AliasTest(TestHelper helper) {
- super(helper, 5000);
- }
-
- @PerformanceTest
- public void resolveNonExistingWith5000AliasTest() throws Exception {
- super.runTest();
- }
-
-}
\ No newline at end of file
diff --git a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000VanityPathTest.java b/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000VanityPathTest.java
deleted file mode 100644
index 72eda16..0000000
--- a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000VanityPathTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.performance.tests;
-
-import org.apache.sling.performance.TestHelper;
-import org.apache.sling.performance.annotation.PerformanceTest;
-
-public class ResolveNonExistingWith5000VanityPathTest extends ResolveNonExistingWithManyVanityPathTest {
-
- public ResolveNonExistingWith5000VanityPathTest(TestHelper helper) {
- super(helper, 100, 50);
- }
-
- @PerformanceTest
- public void resolveNonExistingWith5000VanityPathTest() throws Exception {
- super.runTest();
- }
-
-}
diff --git a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyAliasTest.java b/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyAliasTest.java
index f93a5ca..a376a6e 100644
--- a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyAliasTest.java
+++ b/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyAliasTest.java
@@ -30,10 +30,11 @@
import org.apache.sling.performance.AbstractRepositoryTest;
import org.apache.sling.performance.TestHelper;
import org.apache.sling.performance.ResourceResolverTestRequest;
+import org.apache.sling.performance.annotation.PerformanceTest;
import org.junit.After;
import org.junit.Before;
-class ResolveNonExistingWithManyAliasTest extends AbstractRepositoryTest {
+public class ResolveNonExistingWithManyAliasTest extends AbstractRepositoryTest {
private static final String PN_SLING_ALIAS = "sling:alias";
@@ -49,7 +50,8 @@
private final int nodeCount;
- public ResolveNonExistingWithManyAliasTest(TestHelper helper, int nodeCount) {
+ public ResolveNonExistingWithManyAliasTest(String testInstanceName, TestHelper helper, int nodeCount) {
+ super(testInstanceName);
this.helper = helper;
this.nodeCount = nodeCount;
}
@@ -113,7 +115,8 @@
}
- protected void runTest() throws Exception {
+ @PerformanceTest
+ public void runTest() throws Exception {
String path = ResourceUtil.normalize(ResourceUtil.getParent(rootPath) + "/" + "testNonExistingAlias"
+ ".print.html");
HttpServletRequest request = new ResourceResolverTestRequest(path);
diff --git a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyVanityPathTest.java b/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyVanityPathTest.java
index 9e2fd8f..1e547b9 100644
--- a/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyVanityPathTest.java
+++ b/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyVanityPathTest.java
@@ -29,10 +29,11 @@
import org.apache.sling.performance.AbstractRepositoryTest;
import org.apache.sling.performance.TestHelper;
import org.apache.sling.performance.ResourceResolverTestRequest;
+import org.apache.sling.performance.annotation.PerformanceTest;
import org.junit.After;
import org.junit.Before;
-class ResolveNonExistingWithManyVanityPathTest extends AbstractRepositoryTest {
+public class ResolveNonExistingWithManyVanityPathTest extends AbstractRepositoryTest {
private static final String NT_VANITY_PATH = "sling:VanityPath";
@@ -52,7 +53,9 @@
private final int childNodeCount;
- public ResolveNonExistingWithManyVanityPathTest(TestHelper helper, int nodeCount, int childNodeCount) {
+ public ResolveNonExistingWithManyVanityPathTest(String testInstanceName,
+ TestHelper helper, int nodeCount, int childNodeCount) {
+ super(testInstanceName);
this.helper = helper;
this.nodeCount = nodeCount;
this.childNodeCount = childNodeCount;
@@ -123,8 +126,8 @@
}
-
- protected void runTest() throws Exception {
+ @PerformanceTest
+ public void runTest() throws Exception {
String path = ResourceUtil.normalize(ResourceUtil.getParent(rootPath) + "/" + "testNonExistingVanity"
+ ".print.html");
HttpServletRequest request = new ResourceResolverTestRequest(path);