Package org.apache.activemq.junit
Class ActiveMQTestRunner
java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
org.apache.activemq.junit.ActiveMQTestRunner
- All Implemented Interfaces:
Describable,Filterable,Orderable,Sortable
A Custom JUnit test runner for customizing JUnit tests run in ActiveMQ.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected longgetOriginalTimeout(FrameworkMethod frameworkMethod) protected StatementmethodBlock(FrameworkMethod method) protected StatementwithPotentialRepeat(FrameworkMethod frameworkMethod, Statement next) Check for the presence of aRepeatannotation and return aRepeatStatementto handle executing the test repeated or the original value if not repeating.protected StatementwithPotentialTimeout(FrameworkMethod frameworkMethod, Object testInstance, 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, withBeforesMethods 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 Details
-
ActiveMQTestRunner
- Throws:
InitializationError
-
-
Method Details
-
methodBlock
- Overrides:
methodBlockin classBlockJUnit4ClassRunner
-
withPotentialTimeout
protected Statement withPotentialTimeout(FrameworkMethod frameworkMethod, Object testInstance, 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
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
- Returns:
- the timeout, or
0if none was specified
-