ma.glasnost.orika.test
Class ConcurrentRule
java.lang.Object
ma.glasnost.orika.test.ConcurrentRule
- All Implemented Interfaces:
- org.junit.rules.MethodRule
public final class ConcurrentRule
- extends Object
- implements org.junit.rules.MethodRule
ConcurrentRule is a JUnit Rule which allows a given test method
to be executed currently by a specified number of threads concurrently.
The first Exception thrown by any of the threads is captured and re-thrown
as the overall exception of the method.
TODO: note that the current implementation also invokes @Before and
@After methods concurrently; future task is to make this behavior
configurable.
- Author:
- matt.deboer@gmail.com
based on work by: Mathieu Carbou (mathieu.carbou@gmail.com)
|
Nested Class Summary |
static interface |
ConcurrentRule.Concurrent
Concurrent is used to mark the number of threads which should
be used to invoke the test method simultaneously. |
|
Method Summary |
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement theStatement,
org.junit.runners.model.FrameworkMethod theFrameworkMethod,
Object theObject)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConcurrentRule
public ConcurrentRule()
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement theStatement,
org.junit.runners.model.FrameworkMethod theFrameworkMethod,
Object theObject)
- Specified by:
apply in interface org.junit.rules.MethodRule
Copyright © 2012 Glasnost. All Rights Reserved.