From 5a512655e6262d8931e378c01ed45c50769590c7 Mon Sep 17 00:00:00 2001 From: Neil McErlean Date: Sat, 1 Dec 2012 12:11:37 +0000 Subject: [PATCH] Minor tweak to LoadTestRule javadoc. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@44226 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../alfresco/util/test/junitrules/LoadTestRule.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source/java/org/alfresco/util/test/junitrules/LoadTestRule.java b/source/java/org/alfresco/util/test/junitrules/LoadTestRule.java index 05eb2ce67a..dec55e47fa 100644 --- a/source/java/org/alfresco/util/test/junitrules/LoadTestRule.java +++ b/source/java/org/alfresco/util/test/junitrules/LoadTestRule.java @@ -31,9 +31,7 @@ import java.util.concurrent.CountDownLatch; import org.alfresco.repo.security.authentication.AuthenticationUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.junit.ClassRule; import org.junit.rules.ErrorCollector; -import org.junit.rules.RuleChain; import org.junit.runner.Description; import org.junit.runners.model.Statement; @@ -68,7 +66,7 @@ import org.junit.runners.model.Statement; * @ClassRule public static RuleChain STATIC_RULE_CHAIN = RuleChain.outerRule(APP_CONTEXT_RULE) * .around(TEST_USERS); * - * @Rule LoadTestRule loadTestRule = new LoadTestRule(TEST_USERS); + * @Rule public LoadTestRule loadTestRule = new LoadTestRule(TEST_USERS); * * @Test public void aNormalTestMethod() * { @@ -97,6 +95,10 @@ public class LoadTestRule extends ErrorCollector this.people = people; } + /** + * Gets the number of users/concurrent threads that this Rule has been configured to use. + * @return the number of users/threads. + */ public int getCount() { return this.people.getUsernames().size(); @@ -180,6 +182,9 @@ public class LoadTestRule extends ErrorCollector } } + /** + * This annotation is a marker used to identify a JUnit @Test method as a "load test". + */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @Documented