Skip to content

Instantly share code, notes, and snippets.

@msvab
Created April 25, 2013 07:57
Show Gist options
  • Save msvab/5458197 to your computer and use it in GitHub Desktop.
Save msvab/5458197 to your computer and use it in GitHub Desktop.
JUnit - Concurrent Test Suite
import junit.extensions.ActiveTestSuite;
import junit.extensions.RepeatedTest;
import junit.framework.JUnit4TestAdapter;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
public class ConcurrentTestSample extends TestCase {
public static Test suite() {
TestSuite suite = new ActiveTestSuite();
suite.addTest(new RepeatedTest(new JUnit4TestAdapter(SomeTest.class), 20));
suite.addTest(new RepeatedTest(new JUnit4TestAdapter(OtherTest.class), 20));
return suite;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment