├── README.md ├── concurrent-junit ├── .classpath ├── .gitignore ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── anarsoft │ │ └── vmlens │ │ └── concurrent │ │ └── junit │ │ ├── ConcurrentTestRunner.java │ │ ├── TestUtil.java │ │ ├── ThreadCount.java │ │ └── internal │ │ ├── ConcurrentStatement.java │ │ ├── InvokeListOfMethods.java │ │ ├── NoOpStatement.java │ │ ├── ParallelExecutorThread.java │ │ ├── TestResult.java │ │ ├── TestResultAssumptionViolated.java │ │ ├── TestResultFailure.java │ │ └── TestResultSuccess.java │ └── test │ └── java │ └── com │ └── anarsoft │ └── vmlens │ └── concurrent │ └── example │ ├── AtomicPositiveValue.java │ ├── AtomicPositiveValueUsingAtomicInteger.java │ ├── GenericInterface.java │ ├── RaceConditionInJavaReflection.java │ ├── RaceConditionMissingSynchronization.java │ ├── RaceConditionVolatileCounter.java │ ├── TestAtomicUpdate.java │ ├── TestConcurrentHashMapCompute.java │ ├── TestDeadlockAtomicValue.java │ └── WrongAtomicityStack.java └── docs └── apidocs ├── allclasses-frame.html ├── allclasses-noframe.html ├── com └── anarsoft │ └── vmlens │ └── concurrent │ ├── example │ ├── GenericInterface.html │ ├── RaceConditionMissingSynchronization.html │ ├── RaceConditionVolatileCounter.html │ ├── WrongAtomicityStack.html │ ├── class-use │ │ ├── GenericInterface.html │ │ ├── RaceConditionMissingSynchronization.html │ │ ├── RaceConditionVolatileCounter.html │ │ └── WrongAtomicityStack.html │ ├── package-frame.html │ ├── package-summary.html │ ├── package-tree.html │ └── package-use.html │ └── junit │ ├── ConcurrentTestRunner.html │ ├── TestUtil.html │ ├── ThreadCount.html │ ├── class-use │ ├── ConcurrentTestRunner.html │ ├── TestUtil.html │ └── ThreadCount.html │ ├── internal │ ├── ConcurrentStatement.html │ ├── InvokeListOfMethods.html │ ├── NoOpStatement.html │ ├── ParallelExecutorThread.html │ ├── TestResult.html │ ├── TestResultAssumptionViolated.html │ ├── TestResultFailure.html │ ├── TestResultSuccess.html │ ├── class-use │ │ ├── ConcurrentStatement.html │ │ ├── InvokeListOfMethods.html │ │ ├── NoOpStatement.html │ │ ├── ParallelExecutorThread.html │ │ ├── TestResult.html │ │ ├── TestResultAssumptionViolated.html │ │ ├── TestResultFailure.html │ │ └── TestResultSuccess.html │ ├── package-frame.html │ ├── package-summary.html │ ├── package-tree.html │ └── package-use.html │ ├── package-frame.html │ ├── package-summary.html │ ├── package-tree.html │ └── package-use.html ├── constant-values.html ├── deprecated-list.html ├── help-doc.html ├── index-all.html ├── index.html ├── overview-frame.html ├── overview-summary.html ├── overview-tree.html ├── package-list ├── script.js └── stylesheet.css /README.md: -------------------------------------------------------------------------------- 1 | # concurrent-junit 2 | A http://junit.org test runner to run concurrent unit tests. Runs the tests of one test class in the following order: 3 | 4 | 1. Runs methods marked with org.junit.Before annotation in the main thread. 5 | 2. Runs methods marked with org.junit.Test annotation. Each method is run in 4 parallel threads. 6 | 3. Runs methods marked with org.junit.After annotation in the main thread. 7 | 8 | See [WrongAtomicityStack](https://github.com/ThomasKrieger/concurrent-junit/blob/master/concurrent-junit/src/main/java/com/anarsoft/vmlens/concurrent/example/WrongAtomicityStack.java) for an example on how to use org.junit.Before. See [RaceConditionVolatileCounter](https://github.com/ThomasKrieger/concurrent-junit/blob/master/concurrent-junit/src/main/java/com/anarsoft/vmlens/concurrent/example/RaceConditionVolatileCounter.java) for an example on how to use org.junit.After. Most useful when using a dynamic race condition catcher like http://vmlens.com. 9 | 10 | # Java Doc 11 | [javadoc](https://thomaskrieger.github.io/concurrent-junit/apidocs/) 12 | 13 | # Supported junit versions 14 | concurrent-junit is tested with junit 4.11 and 4.12 15 | 16 | # Latest release 17 | * [jar](http://search.maven.org/remotecontent?filepath=com/vmlens/concurrent-junit/1.0.0/concurrent-junit-1.0.0.jar) 18 | * [sources](http://search.maven.org/remotecontent?filepath=com/vmlens/concurrent-junit/1.0.0/concurrent-junit-1.0.0-sources.jar) 19 | * [javadoc](http://search.maven.org/remotecontent?filepath=com/vmlens/concurrent-junit/1.0.0/concurrent-junit-1.0.0-javadoc.jar) 20 | 21 | 22 | ## Maven 23 | 24 | ```xml 25 | 26 | com.vmlens 27 | concurrent-junit 28 | 1.0.2 29 | 30 | ``` 31 | 32 | 33 | # License 34 | concurrent-junit is released under the [Eclipse Public License 1.0](http://www.eclipse.org/legal/epl-v10.html) 35 | 36 | # Blog Entries about concurrent junit 37 | * [Detecting Java Race Conditions With Tests, Part 2: Non Atomic Updates](http://vmlens.com/articles/detecting-java-race-conditions-with-tests-part-2/) 27/06/2016 38 | * [Detecting Java Race Conditions With Tests, Part 1: Lost Updates](http://vmlens.com/articles/detecting-java-race-conditions-with-tests/) 11/03/2016 39 | * [A new way to junit test your multithreaded java code](http://vmlens.com/articles/a-new-way-to-junit-test-your-multithreaded-java-code/) 18/11/2015 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /concurrent-junit/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /concurrent-junit/.gitignore: -------------------------------------------------------------------------------- 1 | /target/* 2 | /target/ 3 | -------------------------------------------------------------------------------- /concurrent-junit/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | concurrent-junit 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /concurrent-junit/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/test/java=UTF-8 4 | encoding/=UTF-8 5 | -------------------------------------------------------------------------------- /concurrent-junit/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 3 | org.eclipse.jdt.core.compiler.compliance=1.5 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.source=1.5 6 | -------------------------------------------------------------------------------- /concurrent-junit/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /concurrent-junit/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | com.vmlens 6 | concurrent-junit 7 | 1.0.2 8 | jar 9 | 10 | concurrent-junit 11 | A http://junit.org test runner to run concurrent unit tests. 12 | https://github.com/ThomasKrieger/concurrent-junit 13 | 14 | 15 | UTF-8 16 | 17 | 18 | 19 | 20 | Eclipse Public License - v 1.0 21 | http://www.eclipse.org/legal/epl-v10.html 22 | 23 | 24 | 25 | 26 | 27 | Thomas Krieger 28 | thomas.krieger@vmlens.com 29 | vmlens 30 | http://www.vmlens.com 31 | 32 | 33 | 34 | 35 | scm:git:git@github.com:ThomasKrieger/concurrent-junit.git 36 | scm:git:git@github.com:ThomasKrieger/concurrent-junit.git 37 | git@github.com:ThomasKrieger/concurrent-junit.git 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | org.apache.maven.plugins 46 | maven-source-plugin 47 | 48 | 49 | attach-sources 50 | 51 | jar 52 | 53 | 54 | 55 | 56 | 57 | org.apache.maven.plugins 58 | maven-javadoc-plugin 59 | 60 | 61 | attach-javadocs 62 | 63 | jar 64 | 65 | 66 | 67 | 68 | 69 | 70 | *.internal.* 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | junit 81 | junit 82 | 4.12 83 | 84 | 85 | 86 | 87 | org.apache.commons 88 | commons-lang3 89 | 3.4 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /concurrent-junit/src/main/java/com/anarsoft/vmlens/concurrent/junit/TestUtil.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.junit; 2 | 3 | import java.util.LinkedList; 4 | import java.util.List; 5 | 6 | /** 7 | * 8 | * static utility methods for testing methods concurrently. 9 | * 10 | * @author thomas 11 | * 12 | */ 13 | 14 | 15 | public class TestUtil { 16 | 17 | 18 | /** 19 | * 20 | * Runs the runnables with threadCount threads in parallel. 21 | * Example usage: 22 | *
23 | 	 *     	TestUtil.runMultithreaded( new Runnable() {
24 | 	 *		public void run() {
25 | 	 *			try{
26 | 	 *				shouldFindAllPetTypes();
27 | 	 *			}
28 | 	 *			catch(Exception e)
29 | 	 *			{
30 | 	 *				e.printStackTrace();
31 | 	 *			}
32 | 	 *		}
33 |      *	}
34 |      *	, 5);
35 | 	 * 
36 | * 37 | * 38 | * @param runnable 39 | * @param threadCount 40 | * @throws InterruptedException 41 | */ 42 | 43 | 44 | public static void runMultithreaded(Runnable runnable, int threadCount) throws InterruptedException 45 | { 46 | List threadList = new LinkedList(); 47 | 48 | for(int i = 0 ; i < threadCount; i++) 49 | { 50 | threadList.add(new Thread(runnable)); 51 | } 52 | 53 | for( Thread t : threadList) 54 | { 55 | t.start(); 56 | } 57 | 58 | 59 | for( Thread t : threadList) 60 | { 61 | t.join(); 62 | } 63 | 64 | 65 | 66 | 67 | } 68 | 69 | 70 | 71 | } 72 | -------------------------------------------------------------------------------- /concurrent-junit/src/main/java/com/anarsoft/vmlens/concurrent/junit/ThreadCount.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.junit; 2 | 3 | import java.lang.annotation.Retention; 4 | import static java.lang.annotation.RetentionPolicy.*; 5 | 6 | /** 7 | * 8 | * Annotation for a test method. The annotated test method will be run by ThreadCount threads. 9 | * 10 | * @author thomas 11 | * 12 | */ 13 | 14 | 15 | @Retention(value=RUNTIME) 16 | public @interface ThreadCount { 17 | 18 | /** 19 | * the number of threads to use 20 | */ 21 | int value(); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /concurrent-junit/src/main/java/com/anarsoft/vmlens/concurrent/junit/internal/ConcurrentStatement.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.junit.internal; 2 | 3 | import org.junit.internal.AssumptionViolatedException; 4 | import org.junit.internal.runners.model.EachTestNotifier; 5 | import org.junit.runners.model.Statement; 6 | 7 | public class ConcurrentStatement { 8 | 9 | public static TestResult evaluateStatement(Statement statement) 10 | { 11 | try { 12 | statement.evaluate(); 13 | } catch (AssumptionViolatedException e) { 14 | return new TestResultAssumptionViolated(e); 15 | } catch (Throwable e) { 16 | return new TestResultFailure(e); 17 | } 18 | 19 | return new TestResultSuccess(); 20 | } 21 | 22 | 23 | private final Statement statement; 24 | private final EachTestNotifier eachTestNotifier; 25 | private TestResult testResult; 26 | 27 | public ConcurrentStatement(Statement statement, 28 | EachTestNotifier eachTestNotifier) { 29 | super(); 30 | this.statement = statement; 31 | this.eachTestNotifier = eachTestNotifier; 32 | } 33 | 34 | 35 | public void addFailures() 36 | { 37 | testResult.addFailure(eachTestNotifier); 38 | } 39 | 40 | 41 | public void evaluate() 42 | { 43 | testResult = evaluateStatement(statement); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /concurrent-junit/src/main/java/com/anarsoft/vmlens/concurrent/junit/internal/InvokeListOfMethods.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.junit.internal; 2 | 3 | import java.util.List; 4 | 5 | import org.junit.runners.model.FrameworkMethod; 6 | import org.junit.runners.model.Statement; 7 | 8 | public class InvokeListOfMethods extends Statement { 9 | 10 | 11 | private final Object target; 12 | 13 | private final List befores; 14 | 15 | public InvokeListOfMethods( List befores, Object target) { 16 | this.befores = befores; 17 | this.target = target; 18 | } 19 | 20 | @Override 21 | public void evaluate() throws Throwable { 22 | for (FrameworkMethod before : befores) { 23 | before.invokeExplosively(target); 24 | } 25 | 26 | } 27 | } -------------------------------------------------------------------------------- /concurrent-junit/src/main/java/com/anarsoft/vmlens/concurrent/junit/internal/NoOpStatement.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.junit.internal; 2 | 3 | import org.junit.runners.model.Statement; 4 | 5 | public class NoOpStatement extends Statement { 6 | 7 | @Override 8 | public void evaluate() throws Throwable { 9 | // Nothing ToDo 10 | 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /concurrent-junit/src/main/java/com/anarsoft/vmlens/concurrent/junit/internal/ParallelExecutorThread.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.junit.internal; 2 | 3 | 4 | 5 | public class ParallelExecutorThread extends Thread { 6 | 7 | private final ConcurrentStatement concurrentStatement; 8 | 9 | 10 | 11 | 12 | public ParallelExecutorThread(ConcurrentStatement concurrentStatement ) { 13 | super(); 14 | this.setDaemon(true); 15 | this.concurrentStatement = concurrentStatement; 16 | } 17 | 18 | 19 | 20 | 21 | @Override 22 | public void run() { 23 | 24 | try{ 25 | 26 | concurrentStatement.evaluate(); 27 | 28 | } 29 | catch(Exception e) 30 | { 31 | throw new RuntimeException(e); 32 | } 33 | 34 | 35 | } 36 | 37 | 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /concurrent-junit/src/main/java/com/anarsoft/vmlens/concurrent/junit/internal/TestResult.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.junit.internal; 2 | 3 | import org.junit.internal.runners.model.EachTestNotifier; 4 | 5 | public abstract class TestResult { 6 | 7 | 8 | 9 | public TestResult() { 10 | super(); 11 | 12 | } 13 | 14 | public abstract void addFailure(EachTestNotifier eachTestNotifier ); 15 | 16 | 17 | 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /concurrent-junit/src/main/java/com/anarsoft/vmlens/concurrent/junit/internal/TestResultAssumptionViolated.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.junit.internal; 2 | 3 | import org.junit.internal.AssumptionViolatedException; 4 | import org.junit.internal.runners.model.EachTestNotifier; 5 | 6 | public class TestResultAssumptionViolated extends TestResult { 7 | 8 | private final AssumptionViolatedException error; 9 | 10 | public TestResultAssumptionViolated( 11 | AssumptionViolatedException error) { 12 | 13 | this.error = error; 14 | } 15 | 16 | @Override 17 | public void addFailure(EachTestNotifier eachTestNotifier) { 18 | eachTestNotifier.addFailedAssumption(error); 19 | 20 | } 21 | 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /concurrent-junit/src/main/java/com/anarsoft/vmlens/concurrent/junit/internal/TestResultFailure.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.junit.internal; 2 | 3 | import org.junit.internal.runners.model.EachTestNotifier; 4 | 5 | public class TestResultFailure extends TestResult { 6 | 7 | private final Throwable error; 8 | 9 | public TestResultFailure(Throwable error) { 10 | super(); 11 | this.error = error; 12 | } 13 | 14 | @Override 15 | public void addFailure(EachTestNotifier eachTestNotifier) { 16 | eachTestNotifier.addFailure(error); 17 | 18 | } 19 | 20 | 21 | 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /concurrent-junit/src/main/java/com/anarsoft/vmlens/concurrent/junit/internal/TestResultSuccess.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.junit.internal; 2 | 3 | import org.junit.internal.runners.model.EachTestNotifier; 4 | 5 | public class TestResultSuccess extends TestResult { 6 | 7 | public TestResultSuccess() { 8 | super(); 9 | // TODO Auto-generated constructor stub 10 | } 11 | 12 | @Override 13 | public void addFailure(EachTestNotifier eachTestNotifier) { 14 | // TODO Auto-generated method stub 15 | 16 | } 17 | 18 | 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /concurrent-junit/src/test/java/com/anarsoft/vmlens/concurrent/example/AtomicPositiveValue.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.example; 2 | 3 | public class AtomicPositiveValue { 4 | private int value; 5 | public AtomicPositiveValue(int newValue) throws Exception 6 | { 7 | if( newValue < 0 ) 8 | { 9 | throw new Exception("value is negative"); 10 | } 11 | this.value = newValue; 12 | } 13 | public synchronized int get() 14 | { 15 | return value; 16 | } 17 | public synchronized void set(int newValue) throws Exception 18 | { 19 | if( newValue < 0 ) 20 | { 21 | throw new Exception("value is negative"); 22 | } 23 | value = newValue; 24 | } 25 | public synchronized int update(int delta) throws Exception 26 | { 27 | int temp = value + delta; 28 | if( temp < 0 ) 29 | { 30 | throw new Exception("value is negative"); 31 | } 32 | value = temp; 33 | return value; 34 | } 35 | public synchronized void transfer(AtomicPositiveValue other, int amount) throws Exception 36 | { 37 | other.update( -1 * amount ); 38 | update(amount); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /concurrent-junit/src/test/java/com/anarsoft/vmlens/concurrent/example/AtomicPositiveValueUsingAtomicInteger.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.example; 2 | 3 | import java.util.concurrent.atomic.AtomicInteger; 4 | 5 | public class AtomicPositiveValueUsingAtomicInteger { 6 | private final AtomicInteger value; 7 | public AtomicPositiveValueUsingAtomicInteger(int newValue) throws Exception { 8 | if (newValue < 0) { 9 | throw new Exception("value is negative"); 10 | } 11 | value = new AtomicInteger(newValue); 12 | } 13 | 14 | public int get() { 15 | return value.get(); 16 | } 17 | 18 | public int update(int delta) throws Exception { 19 | int current = value.get(); 20 | int update = current + delta; 21 | if (update < 0) { 22 | throw new Exception("value is negative"); 23 | } 24 | while (!value.compareAndSet(current, update)) { 25 | update = current + delta; 26 | if (update < 0) { 27 | throw new Exception("value negative"); 28 | } 29 | } 30 | return update; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /concurrent-junit/src/test/java/com/anarsoft/vmlens/concurrent/example/GenericInterface.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.example; 2 | 3 | 4 | public interface GenericInterface> { 5 | 6 | 7 | } 8 | -------------------------------------------------------------------------------- /concurrent-junit/src/test/java/com/anarsoft/vmlens/concurrent/example/RaceConditionInJavaReflection.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.example; 2 | 3 | 4 | import java.lang.reflect.Type; 5 | import java.lang.reflect.TypeVariable; 6 | import org.junit.Test; 7 | import org.junit.runner.RunWith; 8 | 9 | import com.anarsoft.vmlens.concurrent.junit.ConcurrentTestRunner; 10 | 11 | 12 | /** 13 | * 14 | * {@link #test} is run by 4 threads in parallel. A tool like 15 | * vmlens.com will show a race condition in the method call getBounds. 16 | * 17 | * @author Thomas 18 | * 19 | */ 20 | 21 | @RunWith(ConcurrentTestRunner.class) 22 | public class RaceConditionInJavaReflection { 23 | 24 | 25 | @Test 26 | public void testGetBounds() 27 | { 28 | Class cl = GenericInterface.class; 29 | TypeVariable typeVariable = cl.getTypeParameters()[0]; 30 | 31 | for( Type bound : typeVariable.getBounds() ) 32 | { 33 | // Do something 34 | } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /concurrent-junit/src/test/java/com/anarsoft/vmlens/concurrent/example/RaceConditionMissingSynchronization.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.example; 2 | 3 | import org.apache.commons.lang3.mutable.MutableInt; 4 | import org.junit.Test; 5 | import org.junit.runner.RunWith; 6 | 7 | import com.anarsoft.vmlens.concurrent.junit.ConcurrentTestRunner; 8 | 9 | /** 10 | * 11 | * {@link #addOne} is run by 4 threads in parallel. Since it is not synchronized tools like 12 | * vmlens.com will show a race condition. 13 | * 14 | * @author Thomas 15 | * 16 | */ 17 | 18 | @RunWith(ConcurrentTestRunner.class) 19 | public class RaceConditionMissingSynchronization { 20 | 21 | 22 | private MutableInt mutableInt = new MutableInt(); 23 | 24 | @Test 25 | public void addOne() 26 | { 27 | mutableInt.add(1); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /concurrent-junit/src/test/java/com/anarsoft/vmlens/concurrent/example/RaceConditionVolatileCounter.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.example; 2 | 3 | 4 | import static org.junit.Assert.assertTrue; 5 | 6 | import org.junit.After; 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import com.anarsoft.vmlens.concurrent.junit.ConcurrentTestRunner; 11 | 12 | 13 | 14 | /** 15 | * 16 | * Shows how to use org.junit.After annotation to check for the result of a computation. 17 | * The assertion will fail when run with vmlens.com with 18 | * a waitpoint at com.anarsoft.vmlens.concurrent.example.RaceConditionVolatileCounter.i in 19 | * the method addOne, the variable i will be smaller than 4. 20 | * 21 | * 22 | * 23 | * @author Thomas 24 | * 25 | */ 26 | 27 | @RunWith(ConcurrentTestRunner.class) 28 | public class RaceConditionVolatileCounter { 29 | 30 | 31 | private volatile int i = 0; 32 | 33 | @Test 34 | public void addOne() 35 | { 36 | i++; 37 | } 38 | 39 | @After 40 | public void assertCount() 41 | { 42 | assertTrue("When run with a waitpoint it should be smaller than 4" , i < 4); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /concurrent-junit/src/test/java/com/anarsoft/vmlens/concurrent/example/TestAtomicUpdate.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.example; 2 | 3 | import org.junit.Test; 4 | import static org.junit.Assert.*; 5 | 6 | import java.util.concurrent.atomic.AtomicInteger; 7 | 8 | 9 | public class TestAtomicUpdate { 10 | 11 | @Test 12 | public void testSetAndGetParallel() throws Exception 13 | { 14 | AtomicInteger atomicInteger= new AtomicInteger(0); 15 | int threadA = atomicInteger.get(); 16 | int threadB = atomicInteger.get(); 17 | atomicInteger.set(threadA + 5); 18 | atomicInteger.set(threadB + 5); 19 | assertEquals( atomicInteger.get() , 5 ); 20 | } 21 | public void testSetAndGetSequential() throws Exception 22 | { 23 | AtomicInteger atomicInteger= new AtomicInteger(0); 24 | int threadA = atomicInteger.get(); 25 | atomicInteger.set(threadA + 5); 26 | int threadB = atomicInteger.get(); 27 | atomicInteger.set(threadB + 5); 28 | assertEquals( atomicInteger.get() , 10 ); 29 | } 30 | 31 | 32 | @Test 33 | public void testUpdate() throws Exception 34 | { 35 | AtomicInteger atomicInteger= new AtomicInteger(0); 36 | atomicInteger.addAndGet(5); // Thread A 37 | atomicInteger.addAndGet(5); // Thread B 38 | assertEquals( atomicInteger.get() , 10 ); 39 | } 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /concurrent-junit/src/test/java/com/anarsoft/vmlens/concurrent/example/TestConcurrentHashMapCompute.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.example; 2 | 3 | import java.util.concurrent.ConcurrentHashMap; 4 | import java.util.function.BiFunction; 5 | import org.junit.Test; 6 | import org.junit.runner.RunWith; 7 | import com.anarsoft.vmlens.concurrent.junit.ConcurrentTestRunner; 8 | @RunWith(ConcurrentTestRunner.class) 9 | public class TestConcurrentHashMapCompute { 10 | private final ConcurrentHashMap map = new ConcurrentHashMap(); 11 | public TestConcurrentHashMapCompute() 12 | { 13 | map.put(1, 1); 14 | map.put(2, 2); 15 | } 16 | @Test 17 | public void update12() 18 | { 19 | map.compute( 1 , 20 | new BiFunction() 21 | { 22 | public Integer apply(Integer k, Integer v) { 23 | map.put( 2 , 1); 24 | return v; 25 | } 26 | } 27 | ); 28 | } 29 | @Test 30 | public void update21() 31 | { 32 | map.compute( 2 , 33 | new BiFunction() 34 | { 35 | public Integer apply(Integer k, Integer v) { 36 | map.put( 1 , 1); 37 | return v; 38 | } 39 | } 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /concurrent-junit/src/test/java/com/anarsoft/vmlens/concurrent/example/TestDeadlockAtomicValue.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.example; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import com.anarsoft.vmlens.concurrent.junit.ConcurrentTestRunner; 6 | @RunWith(ConcurrentTestRunner.class) 7 | public class TestDeadlockAtomicValue { 8 | private final AtomicPositiveValue first; 9 | private final AtomicPositiveValue second; 10 | public TestDeadlockAtomicValue() throws Exception 11 | { 12 | first = new AtomicPositiveValue(1000); 13 | second = new AtomicPositiveValue(1000); 14 | } 15 | @Test 16 | public void testTransferFirstToSecond() throws Exception 17 | { 18 | second.transfer( first , 1); 19 | } 20 | @Test 21 | public void testTransferSecondToFirst() throws Exception 22 | { 23 | first.transfer( second , 1); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /concurrent-junit/src/test/java/com/anarsoft/vmlens/concurrent/example/WrongAtomicityStack.java: -------------------------------------------------------------------------------- 1 | package com.anarsoft.vmlens.concurrent.example; 2 | 3 | 4 | import static org.junit.Assert.assertTrue; 5 | 6 | import java.util.EmptyStackException; 7 | import java.util.Stack; 8 | 9 | import org.junit.After; 10 | import org.junit.Before; 11 | import org.junit.Test; 12 | import org.junit.runner.RunWith; 13 | 14 | import com.anarsoft.vmlens.concurrent.junit.ConcurrentTestRunner; 15 | 16 | /** 17 | * 18 | * Shows how to use org.junit.Before annotation to create the pre-conditions of a concurrent tests. {@link #setup} will be only called once, {@link #removeOne} 4 times in parallel. 19 | * When you run this test with vmlens.com with a waitpoint set at the field java.util.Vector.elementCount in the method removeOne 20 | * , {@link #removeOne} will throw a java.util.EmptyStackException. 21 | * 22 | * 23 | * 24 | * @author Thomas 25 | * 26 | */ 27 | @RunWith(ConcurrentTestRunner.class) 28 | public class WrongAtomicityStack { 29 | 30 | private Stack stack = new Stack(); 31 | private volatile boolean emptyStackExceptionThrown = false; 32 | 33 | 34 | @Before 35 | public void setup() throws Exception 36 | { 37 | stack.push("abcd"); 38 | } 39 | 40 | @Test 41 | public void removeOne() throws Exception 42 | { 43 | try{ 44 | if( ! stack.isEmpty() ) 45 | { 46 | stack.pop(); 47 | } 48 | } 49 | catch(EmptyStackException exception) 50 | { 51 | emptyStackExceptionThrown = true; 52 | } 53 | catch(ArrayIndexOutOfBoundsException exception) 54 | { 55 | emptyStackExceptionThrown = true; 56 | } 57 | } 58 | 59 | @After 60 | public void checkExceptionThrown() 61 | { 62 | assertTrue("When a waitpoint is set an EmptyStackException should be thrown" ,emptyStackExceptionThrown); 63 | } 64 | 65 | 66 | 67 | } 68 | -------------------------------------------------------------------------------- /docs/apidocs/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (concurrent-junit 1.0.2 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/apidocs/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (concurrent-junit 1.0.2 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/example/GenericInterface.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | GenericInterface (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 87 | 88 | 89 |
90 |
com.anarsoft.vmlens.concurrent.example
91 |

Interface GenericInterface<Y extends GenericInterface<Y>>

92 |
93 |
94 |
95 |
    96 |
  • 97 |
    98 |
    99 |
    public interface GenericInterface<Y extends GenericInterface<Y>>
    100 |
  • 101 |
102 |
103 |
104 | 105 | 106 |
107 | 108 | 109 | 110 | 111 | 112 | 113 | 123 |
124 | 166 | 167 |

Copyright © 2017. All rights reserved.

168 | 169 | 170 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/example/class-use/GenericInterface.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Interface com.anarsoft.vmlens.concurrent.example.GenericInterface (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Uses of Interface
com.anarsoft.vmlens.concurrent.example.GenericInterface

75 |
76 |
77 | 116 |
117 | 118 |
119 | 120 | 121 | 122 | 123 | 124 | 125 | 135 |
136 | 163 | 164 |

Copyright © 2017. All rights reserved.

165 | 166 | 167 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/example/class-use/RaceConditionMissingSynchronization.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Class com.anarsoft.vmlens.concurrent.example.RaceConditionMissingSynchronization (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Uses of Class
com.anarsoft.vmlens.concurrent.example.RaceConditionMissingSynchronization

75 |
76 |
No usage of com.anarsoft.vmlens.concurrent.example.RaceConditionMissingSynchronization
77 | 78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | 95 |
96 | 123 | 124 |

Copyright © 2017. All rights reserved.

125 | 126 | 127 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/example/class-use/RaceConditionVolatileCounter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Class com.anarsoft.vmlens.concurrent.example.RaceConditionVolatileCounter (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Uses of Class
com.anarsoft.vmlens.concurrent.example.RaceConditionVolatileCounter

75 |
76 |
No usage of com.anarsoft.vmlens.concurrent.example.RaceConditionVolatileCounter
77 | 78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | 95 |
96 | 123 | 124 |

Copyright © 2017. All rights reserved.

125 | 126 | 127 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/example/class-use/WrongAtomicityStack.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Class com.anarsoft.vmlens.concurrent.example.WrongAtomicityStack (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Uses of Class
com.anarsoft.vmlens.concurrent.example.WrongAtomicityStack

75 |
76 |
No usage of com.anarsoft.vmlens.concurrent.example.WrongAtomicityStack
77 | 78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | 95 |
96 | 123 | 124 |

Copyright © 2017. All rights reserved.

125 | 126 | 127 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/example/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.anarsoft.vmlens.concurrent.example (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 |

com.anarsoft.vmlens.concurrent.example

14 |
15 |

Interfaces

16 | 19 |

Classes

20 | 25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/example/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.anarsoft.vmlens.concurrent.example (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Package com.anarsoft.vmlens.concurrent.example

75 |
76 |
77 | 123 |
124 | 125 |
126 | 127 | 128 | 129 | 130 | 131 | 132 | 142 |
143 | 170 | 171 |

Copyright © 2017. All rights reserved.

172 | 173 | 174 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/example/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.anarsoft.vmlens.concurrent.example Class Hierarchy (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Hierarchy For Package com.anarsoft.vmlens.concurrent.example

75 | Package Hierarchies: 76 | 79 |
80 |
81 |

Class Hierarchy

82 | 91 |

Interface Hierarchy

92 | 95 |
96 | 97 |
98 | 99 | 100 | 101 | 102 | 103 | 104 | 114 |
115 | 142 | 143 |

Copyright © 2017. All rights reserved.

144 | 145 | 146 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/example/package-use.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Package com.anarsoft.vmlens.concurrent.example (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Uses of Package
com.anarsoft.vmlens.concurrent.example

75 |
76 |
77 | 109 |
110 | 111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 | 128 |
129 | 156 | 157 |

Copyright © 2017. All rights reserved.

158 | 159 | 160 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/ThreadCount.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | ThreadCount (concurrent-junit 1.0.2 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 43 |
44 | 84 | 85 | 86 |
87 |
com.anarsoft.vmlens.concurrent.junit
88 |

Annotation Type ThreadCount

89 |
90 |
91 |
92 |
    93 |
  • 94 |
    95 |
    96 |
    @Retention(value=RUNTIME)
     97 | public @interface ThreadCount
    98 |
    Annotation for a test method. The annotated test method will be run by ThreadCount threads.
    99 |
    100 |
    Author:
    101 |
    thomas
    102 |
    103 |
  • 104 |
105 |
106 |
107 |
    108 |
  • 109 | 110 |
      111 |
    • 112 | 113 | 114 |

      Required Element Summary

      115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 126 | 127 |
      Required Elements 
      Modifier and TypeRequired Element and Description
      intvalue 124 |
      the number of threads to use
      125 |
      128 |
    • 129 |
    130 |
  • 131 |
132 |
133 |
134 |
    135 |
  • 136 | 137 |
      138 |
    • 139 | 140 | 141 |

      Element Detail

      142 | 143 | 144 | 145 |
        146 |
      • 147 |

        value

        148 |
        public abstract int value
        149 |
        the number of threads to use
        150 |
      • 151 |
      152 |
    • 153 |
    154 |
  • 155 |
156 |
157 |
158 | 159 | 160 |
161 | 162 | 163 | 164 | 165 | 166 | 167 | 176 |
177 | 217 | 218 |

Copyright © 2017. All rights reserved.

219 | 220 | 221 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/class-use/ConcurrentTestRunner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Class com.anarsoft.vmlens.concurrent.junit.ConcurrentTestRunner (concurrent-junit 1.0.2 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 43 |
44 | 71 | 72 |
73 |

Uses of Class
com.anarsoft.vmlens.concurrent.junit.ConcurrentTestRunner

74 |
75 |
No usage of com.anarsoft.vmlens.concurrent.junit.ConcurrentTestRunner
76 | 77 |
78 | 79 | 80 | 81 | 82 | 83 | 84 | 93 |
94 | 121 | 122 |

Copyright © 2017. All rights reserved.

123 | 124 | 125 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/class-use/TestUtil.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Class com.anarsoft.vmlens.concurrent.junit.TestUtil (concurrent-junit 1.0.2 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 43 |
44 | 71 | 72 |
73 |

Uses of Class
com.anarsoft.vmlens.concurrent.junit.TestUtil

74 |
75 |
No usage of com.anarsoft.vmlens.concurrent.junit.TestUtil
76 | 77 |
78 | 79 | 80 | 81 | 82 | 83 | 84 | 93 |
94 | 121 | 122 |

Copyright © 2017. All rights reserved.

123 | 124 | 125 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/class-use/ThreadCount.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Class com.anarsoft.vmlens.concurrent.junit.ThreadCount (concurrent-junit 1.0.2 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 43 |
44 | 71 | 72 |
73 |

Uses of Class
com.anarsoft.vmlens.concurrent.junit.ThreadCount

74 |
75 |
No usage of com.anarsoft.vmlens.concurrent.junit.ThreadCount
76 | 77 |
78 | 79 | 80 | 81 | 82 | 83 | 84 | 93 |
94 | 121 | 122 |

Copyright © 2017. All rights reserved.

123 | 124 | 125 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/internal/class-use/ConcurrentStatement.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Class com.anarsoft.vmlens.concurrent.junit.internal.ConcurrentStatement (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Uses of Class
com.anarsoft.vmlens.concurrent.junit.internal.ConcurrentStatement

75 |
76 |
77 | 114 |
115 | 116 |
117 | 118 | 119 | 120 | 121 | 122 | 123 | 133 |
134 | 161 | 162 |

Copyright © 2017. All rights reserved.

163 | 164 | 165 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/internal/class-use/InvokeListOfMethods.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Class com.anarsoft.vmlens.concurrent.junit.internal.InvokeListOfMethods (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Uses of Class
com.anarsoft.vmlens.concurrent.junit.internal.InvokeListOfMethods

75 |
76 |
No usage of com.anarsoft.vmlens.concurrent.junit.internal.InvokeListOfMethods
77 | 78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | 95 |
96 | 123 | 124 |

Copyright © 2017. All rights reserved.

125 | 126 | 127 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/internal/class-use/NoOpStatement.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Class com.anarsoft.vmlens.concurrent.junit.internal.NoOpStatement (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Uses of Class
com.anarsoft.vmlens.concurrent.junit.internal.NoOpStatement

75 |
76 |
No usage of com.anarsoft.vmlens.concurrent.junit.internal.NoOpStatement
77 | 78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | 95 |
96 | 123 | 124 |

Copyright © 2017. All rights reserved.

125 | 126 | 127 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/internal/class-use/ParallelExecutorThread.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Class com.anarsoft.vmlens.concurrent.junit.internal.ParallelExecutorThread (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Uses of Class
com.anarsoft.vmlens.concurrent.junit.internal.ParallelExecutorThread

75 |
76 |
No usage of com.anarsoft.vmlens.concurrent.junit.internal.ParallelExecutorThread
77 | 78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | 95 |
96 | 123 | 124 |

Copyright © 2017. All rights reserved.

125 | 126 | 127 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/internal/class-use/TestResultAssumptionViolated.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Class com.anarsoft.vmlens.concurrent.junit.internal.TestResultAssumptionViolated (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Uses of Class
com.anarsoft.vmlens.concurrent.junit.internal.TestResultAssumptionViolated

75 |
76 |
No usage of com.anarsoft.vmlens.concurrent.junit.internal.TestResultAssumptionViolated
77 | 78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | 95 |
96 | 123 | 124 |

Copyright © 2017. All rights reserved.

125 | 126 | 127 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/internal/class-use/TestResultFailure.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Class com.anarsoft.vmlens.concurrent.junit.internal.TestResultFailure (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Uses of Class
com.anarsoft.vmlens.concurrent.junit.internal.TestResultFailure

75 |
76 |
No usage of com.anarsoft.vmlens.concurrent.junit.internal.TestResultFailure
77 | 78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | 95 |
96 | 123 | 124 |

Copyright © 2017. All rights reserved.

125 | 126 | 127 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/internal/class-use/TestResultSuccess.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Class com.anarsoft.vmlens.concurrent.junit.internal.TestResultSuccess (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Uses of Class
com.anarsoft.vmlens.concurrent.junit.internal.TestResultSuccess

75 |
76 |
No usage of com.anarsoft.vmlens.concurrent.junit.internal.TestResultSuccess
77 | 78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | 95 |
96 | 123 | 124 |

Copyright © 2017. All rights reserved.

125 | 126 | 127 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/internal/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.anarsoft.vmlens.concurrent.junit.internal (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 |

com.anarsoft.vmlens.concurrent.junit.internal

14 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/internal/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.anarsoft.vmlens.concurrent.junit.internal (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Package com.anarsoft.vmlens.concurrent.junit.internal

75 |
76 |
77 | 122 |
123 | 124 |
125 | 126 | 127 | 128 | 129 | 130 | 131 | 141 |
142 | 169 | 170 |

Copyright © 2017. All rights reserved.

171 | 172 | 173 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/internal/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.anarsoft.vmlens.concurrent.junit.internal Class Hierarchy (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Hierarchy For Package com.anarsoft.vmlens.concurrent.junit.internal

75 | Package Hierarchies: 76 | 79 |
80 |
81 |

Class Hierarchy

82 | 107 |
108 | 109 |
110 | 111 | 112 | 113 | 114 | 115 | 116 | 126 |
127 | 154 | 155 |

Copyright © 2017. All rights reserved.

156 | 157 | 158 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/internal/package-use.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Package com.anarsoft.vmlens.concurrent.junit.internal (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

Uses of Package
com.anarsoft.vmlens.concurrent.junit.internal

75 |
76 |
77 | 112 |
113 | 114 |
115 | 116 | 117 | 118 | 119 | 120 | 121 | 131 |
132 | 159 | 160 |

Copyright © 2017. All rights reserved.

161 | 162 | 163 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.anarsoft.vmlens.concurrent.junit (concurrent-junit 1.0.2 API) 8 | 9 | 10 | 11 | 12 | 13 |

com.anarsoft.vmlens.concurrent.junit

14 |
15 |

Classes

16 | 20 |

Annotation Types

21 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.anarsoft.vmlens.concurrent.junit (concurrent-junit 1.0.2 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 43 |
44 | 71 | 72 |
73 |

Package com.anarsoft.vmlens.concurrent.junit

74 |
75 |
76 |
    77 |
  • 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 90 | 91 | 92 | 93 | 96 | 97 | 98 |
    Class Summary 
    ClassDescription
    ConcurrentTestRunner 88 |
    A JUnit test runner to run concurrent unit tests.
    89 |
    TestUtil 94 |
    static utility methods for testing methods concurrently.
    95 |
    99 |
  • 100 |
  • 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 113 | 114 | 115 |
    Annotation Types Summary 
    Annotation TypeDescription
    ThreadCount 111 |
    Annotation for a test method.
    112 |
    116 |
  • 117 |
118 |
119 | 120 |
121 | 122 | 123 | 124 | 125 | 126 | 127 | 136 |
137 | 164 | 165 |

Copyright © 2017. All rights reserved.

166 | 167 | 168 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.anarsoft.vmlens.concurrent.junit Class Hierarchy (concurrent-junit 1.0.2 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 43 |
44 | 71 | 72 |
73 |

Hierarchy For Package com.anarsoft.vmlens.concurrent.junit

74 |
75 |
76 |

Class Hierarchy

77 |
    78 |
  • java.lang.Object 79 |
      80 |
    • org.junit.runner.Runner (implements org.junit.runner.Describable) 81 |
        82 |
      • org.junit.runners.ParentRunner<T> (implements org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable) 83 |
          84 |
        • org.junit.runners.BlockJUnit4ClassRunner 85 | 88 |
        • 89 |
        90 |
      • 91 |
      92 |
    • 93 |
    • com.anarsoft.vmlens.concurrent.junit.TestUtil
    • 94 |
    95 |
  • 96 |
97 |

Annotation Type Hierarchy

98 |
    99 |
  • com.anarsoft.vmlens.concurrent.junit.ThreadCount (implements java.lang.annotation.Annotation)
  • 100 |
101 |
102 | 103 |
104 | 105 | 106 | 107 | 108 | 109 | 110 | 119 |
120 | 147 | 148 |

Copyright © 2017. All rights reserved.

149 | 150 | 151 | -------------------------------------------------------------------------------- /docs/apidocs/com/anarsoft/vmlens/concurrent/junit/package-use.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Uses of Package com.anarsoft.vmlens.concurrent.junit (concurrent-junit 1.0.2 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 43 |
44 | 71 | 72 |
73 |

Uses of Package
com.anarsoft.vmlens.concurrent.junit

74 |
75 |
No usage of com.anarsoft.vmlens.concurrent.junit
76 | 77 |
78 | 79 | 80 | 81 | 82 | 83 | 84 | 93 |
94 | 121 | 122 |

Copyright © 2017. All rights reserved.

123 | 124 | 125 | -------------------------------------------------------------------------------- /docs/apidocs/constant-values.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Constant Field Values (concurrent-junit 1.0.2 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 43 |
44 | 71 | 72 |
73 |

Constant Field Values

74 |

Contents

75 |
76 | 77 |
78 | 79 | 80 | 81 | 82 | 83 | 84 | 93 |
94 | 121 | 122 |

Copyright © 2017. All rights reserved.

123 | 124 | 125 | -------------------------------------------------------------------------------- /docs/apidocs/deprecated-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Deprecated List (concurrent-junit 1.0.2 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 43 |
44 | 71 | 72 |
73 |

Deprecated API

74 |

Contents

75 |
76 | 77 |
78 | 79 | 80 | 81 | 82 | 83 | 84 | 93 |
94 | 121 | 122 |

Copyright © 2017. All rights reserved.

123 | 124 | 125 | -------------------------------------------------------------------------------- /docs/apidocs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | concurrent-junit 1.0.2 API 8 | 60 | 61 | 62 | 63 | 64 | 65 | <noscript> 66 | <div>JavaScript is disabled on your browser.</div> 67 | </noscript> 68 | <h2>Frame Alert</h2> 69 | <p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="com/anarsoft/vmlens/concurrent/junit/package-summary.html">Non-frame version</a>.</p> 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /docs/apidocs/overview-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Overview List (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 |

 

23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/apidocs/overview-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Overview (concurrent-junit 1.0.1 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 44 |
45 | 72 | 73 |
74 |

concurrent-junit 1.0.1 API

75 |
76 |
77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 |
Packages 
PackageDescription
com.anarsoft.vmlens.concurrent.example 
com.anarsoft.vmlens.concurrent.junit 
com.anarsoft.vmlens.concurrent.junit.internal 
98 |
99 | 100 |
101 | 102 | 103 | 104 | 105 | 106 | 107 | 117 |
118 | 145 | 146 |

Copyright © 2017. All rights reserved.

147 | 148 | 149 | -------------------------------------------------------------------------------- /docs/apidocs/overview-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Class Hierarchy (concurrent-junit 1.0.2 API) 8 | 9 | 10 | 11 | 12 | 13 | 23 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 43 |
44 | 71 | 72 |
73 |

Hierarchy For All Packages

74 | Package Hierarchies: 75 | 78 |
79 |
80 |

Class Hierarchy

81 |
    82 |
  • java.lang.Object 83 |
      84 |
    • org.junit.runner.Runner (implements org.junit.runner.Describable) 85 |
        86 |
      • org.junit.runners.ParentRunner<T> (implements org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable) 87 |
          88 |
        • org.junit.runners.BlockJUnit4ClassRunner 89 | 92 |
        • 93 |
        94 |
      • 95 |
      96 |
    • 97 |
    • com.anarsoft.vmlens.concurrent.junit.TestUtil
    • 98 |
    99 |
  • 100 |
101 |

Annotation Type Hierarchy

102 |
    103 |
  • com.anarsoft.vmlens.concurrent.junit.ThreadCount (implements java.lang.annotation.Annotation)
  • 104 |
105 |
106 | 107 |
108 | 109 | 110 | 111 | 112 | 113 | 114 | 123 |
124 | 151 | 152 |

Copyright © 2017. All rights reserved.

153 | 154 | 155 | -------------------------------------------------------------------------------- /docs/apidocs/package-list: -------------------------------------------------------------------------------- 1 | com.anarsoft.vmlens.concurrent.junit 2 | -------------------------------------------------------------------------------- /docs/apidocs/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | --------------------------------------------------------------------------------