equal
deleted
inserted
replaced
24 import java.io.PrintWriter; |
24 import java.io.PrintWriter; |
25 import java.io.StringWriter; |
25 import java.io.StringWriter; |
26 import java.util.concurrent.ExecutorService; |
26 import java.util.concurrent.ExecutorService; |
27 import java.util.concurrent.Executors; |
27 import java.util.concurrent.Executors; |
28 import java.util.concurrent.ThreadFactory; |
28 import java.util.concurrent.ThreadFactory; |
|
29 import java.util.concurrent.TimeUnit; |
29 import java.util.concurrent.atomic.AtomicInteger; |
30 import java.util.concurrent.atomic.AtomicInteger; |
30 import javax.tools.JavaCompiler; |
31 import javax.tools.JavaCompiler; |
31 import javax.tools.StandardJavaFileManager; |
32 import javax.tools.StandardJavaFileManager; |
32 import javax.tools.ToolProvider; |
33 import javax.tools.ToolProvider; |
33 |
34 |
65 protected static PrintWriter outWriter = new PrintWriter(outSWriter); |
66 protected static PrintWriter outWriter = new PrintWriter(outSWriter); |
66 |
67 |
67 protected static void checkAfterExec(boolean printCheckCount) |
68 protected static void checkAfterExec(boolean printCheckCount) |
68 throws InterruptedException { |
69 throws InterruptedException { |
69 pool.shutdown(); |
70 pool.shutdown(); |
70 while (!pool.isTerminated()) { |
71 pool.awaitTermination(15, TimeUnit.MINUTES); |
71 Thread.sleep(10); |
|
72 } |
|
73 if (errCount.get() > 0) { |
72 if (errCount.get() > 0) { |
74 if (throwAssertionOnError) { |
73 if (throwAssertionOnError) { |
75 closePrinters(); |
74 closePrinters(); |
76 System.err.println(errSWriter.toString()); |
75 System.err.println(errSWriter.toString()); |
77 throw new AssertionError( |
76 throw new AssertionError( |