Package org.apache.activemq.junit
Class ActiveMQTestRunner
- java.lang.Object
-
- org.junit.runner.Runner
-
- org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
-
- org.junit.runners.BlockJUnit4ClassRunner
-
- org.apache.activemq.junit.ActiveMQTestRunner
-
- All Implemented Interfaces:
Describable,Filterable,Orderable,Sortable
public class ActiveMQTestRunner extends BlockJUnit4ClassRunner
A Custom JUnit test runner for customizing JUnit tests run in ActiveMQ.
-
-
Constructor Summary
Constructors Constructor Description ActiveMQTestRunner(Class<?> klass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longgetOriginalTimeout(org.junit.runners.model.FrameworkMethod frameworkMethod)Retrieve the original JUnittimeoutfrom the@Testannotation on the incoming test method.protected org.junit.runners.model.StatementmethodBlock(org.junit.runners.model.FrameworkMethod method)protected org.junit.runners.model.StatementwithPotentialRepeat(org.junit.runners.model.FrameworkMethod frameworkMethod, org.junit.runners.model.Statement next)Check for the presence of aRepeatannotation and return aRepeatStatementto handle executing the test repeated or the original value if not repeating.protected org.junit.runners.model.StatementwithPotentialTimeout(org.junit.runners.model.FrameworkMethod frameworkMethod, Object testInstance, org.junit.runners.model.Statement next)Perform the same logic asBlockJUnit4ClassRunner.withPotentialTimeout(FrameworkMethod, Object, Statement)but with additional support for changing the coded timeout with an extended value.-
Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, computeTestMethods, createTest, createTest, describeChild, getChildren, getTestRules, isIgnored, methodInvoker, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores
-
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolation
-
-
-
-
Constructor Detail
-
ActiveMQTestRunner
public ActiveMQTestRunner(Class<?> klass) throws org.junit.runners.model.InitializationError
- Throws:
org.junit.runners.model.InitializationError
-
-
Method Detail
-
methodBlock
protected org.junit.runners.model.Statement methodBlock(org.junit.runners.model.FrameworkMethod method)
- Overrides:
methodBlockin classBlockJUnit4ClassRunner
-
withPotentialTimeout
protected org.junit.runners.model.Statement withPotentialTimeout(org.junit.runners.model.FrameworkMethod frameworkMethod, Object testInstance, org.junit.runners.model.Statement next)Perform the same logic asBlockJUnit4ClassRunner.withPotentialTimeout(FrameworkMethod, Object, Statement)but with additional support for changing the coded timeout with an extended value.- Overrides:
withPotentialTimeoutin classBlockJUnit4ClassRunner- Returns:
- either a
FailOnTimeout, or the suppliedStatementas appropriate.
-
withPotentialRepeat
protected org.junit.runners.model.Statement withPotentialRepeat(org.junit.runners.model.FrameworkMethod frameworkMethod, org.junit.runners.model.Statement next)Check for the presence of aRepeatannotation and return aRepeatStatementto handle executing the test repeated or the original value if not repeating.- Returns:
- either a
RepeatStatement, or the suppliedStatementas appropriate.
-
getOriginalTimeout
protected long getOriginalTimeout(org.junit.runners.model.FrameworkMethod frameworkMethod)
Retrieve the original JUnittimeoutfrom the@Testannotation on the incoming test method.- Returns:
- the timeout, or
0if none was specified
-
-