@Test public void testAnythingYouWantToPlayWith() throws Exception { Result result = new Result(); Class<?>[] realClasses = new Class[]{ Dummy.class, Dummy2.class }; DiagnosticRunListener diagnosticRunListener = new DiagnosticRunListener( false, result.createListener() ); JUnitCore jUnitCore = getJunitCore( diagnosticRunListener ); ConfigurableParallelComputer computer = new ConfigurableParallelComputer( true, false ); jUnitCore.run( computer, realClasses ); computer.close(); assertEquals( "All tests should succeed, right ?", 5, result.getRunCount() ); }
@SuppressWarnings( { "UnusedDeclaration" } ) public void close() throws ExecutionException { for ( AsynchronousRunner nonBlocker : nonBlockers ) { nonBlocker.waitForCompletion(); } fService.shutdown(); try { if ( !fService.awaitTermination( 10, java.util.concurrent.TimeUnit.SECONDS ) ) { throw new RuntimeException( "Executor did not shut down within timeout" ); } } catch ( InterruptedException e ) { throw new RuntimeException( e ); } }
ConfigurableParallelComputer extends Computer { @SuppressWarnings( { "UnusedDeclaration" } ) public void close() throws ExecutionException { for ( AsynchronousRunner nonBlocker : nonBlockers ) { nonBlocker.waitForCompletion(); } fService.shutdown(); try { if ( !fService.awaitTermination( 10, java.util.concurrent.TimeUnit.SECONDS ) ) { throw new RuntimeException( "Executor did not shut down within timeout" ); } } catch ( InterruptedException e ) { throw new RuntimeException( e ); } } }
ConfigurableParallelComputer extends Computer { @SuppressWarnings( { "UnusedDeclaration" } ) public void close() throws ExecutionException { for ( AsynchronousRunner nonBlocker : nonBlockers ) { nonBlocker.waitForCompletion(); } fService.shutdown(); try { if ( !fService.awaitTermination( 10, java.util.concurrent.TimeUnit.SECONDS ) ) { throw new RuntimeException( "Executor did not shut down within timeout" ); } } catch ( InterruptedException e ) { throw new RuntimeException( e ); } } ConfigurableParallelComputer();  ConfigurableParallelComputer( boolean fClasses, boolean fMethods );  ConfigurableParallelComputer( boolean fClasses, boolean fMethods, Integer numberOfThreads, boolean perCore ); private  ConfigurableParallelComputer( boolean fClasses, boolean fMethods, ExecutorService executorService,
                                          boolean fixedPool ); }
ConfigurableParallelComputer extends Computer { @SuppressWarnings( { "UnusedDeclaration" } ) public void close() throws ExecutionException { for ( AsynchronousRunner nonBlocker : nonBlockers ) { nonBlocker.waitForCompletion(); } fService.shutdown(); try { if ( !fService.awaitTermination( 10, java.util.concurrent.TimeUnit.SECONDS ) ) { throw new RuntimeException( "Executor did not shut down within timeout" ); } } catch ( InterruptedException e ) { throw new RuntimeException( e ); } } ConfigurableParallelComputer();  ConfigurableParallelComputer( boolean fClasses, boolean fMethods );  ConfigurableParallelComputer( boolean fClasses, boolean fMethods, Integer numberOfThreads, boolean perCore ); private  ConfigurableParallelComputer( boolean fClasses, boolean fMethods, ExecutorService executorService,
                                          boolean fixedPool ); @SuppressWarnings( { "UnusedDeclaration" } ) void close(); @Override Runner getSuite( RunnerBuilder builder, java.lang.Class<?>[] classes ); @Override String toString(); }
ConfigurableParallelComputer extends Computer { @SuppressWarnings( { "UnusedDeclaration" } ) public void close() throws ExecutionException { for ( AsynchronousRunner nonBlocker : nonBlockers ) { nonBlocker.waitForCompletion(); } fService.shutdown(); try { if ( !fService.awaitTermination( 10, java.util.concurrent.TimeUnit.SECONDS ) ) { throw new RuntimeException( "Executor did not shut down within timeout" ); } } catch ( InterruptedException e ) { throw new RuntimeException( e ); } } ConfigurableParallelComputer();  ConfigurableParallelComputer( boolean fClasses, boolean fMethods );  ConfigurableParallelComputer( boolean fClasses, boolean fMethods, Integer numberOfThreads, boolean perCore ); private  ConfigurableParallelComputer( boolean fClasses, boolean fMethods, ExecutorService executorService,
                                          boolean fixedPool ); @SuppressWarnings( { "UnusedDeclaration" } ) void close(); @Override Runner getSuite( RunnerBuilder builder, java.lang.Class<?>[] classes ); @Override String toString();  }