[cvs] / jsr166 / src / test / tck / AbstractExecutorServiceTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/AbstractExecutorServiceTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11, Sun Dec 28 21:56:18 2003 UTC revision 1.12, Mon Jan 12 16:37:40 2004 UTC
# Line 36  Line 36 
36      }      }
37    
38      /**      /**
39       * execute of runnable runs it to completion       * execute(runnable) runs it to completion
40       */       */
41      public void testExecuteRunnable() {      public void testExecuteRunnable() {
42          try {          try {
# Line 57  Line 57 
57    
58    
59      /**      /**
60       * completed submit of callable returns result       * Completed submit(callable) returns result
61       */       */
62      public void testSubmitCallable() {      public void testSubmitCallable() {
63          try {          try {
# Line 75  Line 75 
75      }      }
76    
77      /**      /**
78       * completed submit of runnable returns successfully       * Completed submit(runnable) returns successfully
79       */       */
80      public void testSubmitRunnable() {      public void testSubmitRunnable() {
81          try {          try {
# Line 93  Line 93 
93      }      }
94    
95      /**      /**
96       * completed submit of (runnable, result) returns result       * Completed submit(runnable, result) returns result
97       */       */
98      public void testSubmitRunnable2() {      public void testSubmitRunnable2() {
99          try {          try {
# Line 112  Line 112 
112    
113    
114      /**      /**
115       * submit of a privileged action runs it to completion       * A submitted privileged action to completion
116       */       */
117      public void testSubmitPrivilegedAction() {      public void testSubmitPrivilegedAction() {
118          Policy savedPolicy = Policy.getPolicy();          Policy savedPolicy = Policy.getPolicy();
# Line 142  Line 142 
142      }      }
143    
144      /**      /**
145       * submit of a privileged exception action runs it to completion       * A submitted a privileged exception action runs to completion
146       */       */
147      public void testSubmitPrivilegedExceptionAction() {      public void testSubmitPrivilegedExceptionAction() {
148          Policy savedPolicy = Policy.getPolicy();          Policy savedPolicy = Policy.getPolicy();
# Line 172  Line 172 
172      }      }
173    
174      /**      /**
175       * submit of a failed privileged exception action reports exception       * A submitted failed privileged exception action reports exception
176       */       */
177      public void testSubmitFailedPrivilegedExceptionAction() {      public void testSubmitFailedPrivilegedExceptionAction() {
178          Policy savedPolicy = Policy.getPolicy();          Policy savedPolicy = Policy.getPolicy();
# Line 201  Line 201 
201      }      }
202    
203      /**      /**
204       * execute with a null runnable throws NPE       * execute(null runnable) throws NPE
205       */       */
206      public void testExecuteNullRunnable() {      public void testExecuteNullRunnable() {
207          try {          try {
# Line 219  Line 219 
219    
220    
221      /**      /**
222       * submit of a null callable throws NPE       * submit(null callable) throws NPE
223       */       */
224      public void testSubmitNullCallable() {      public void testSubmitNullCallable() {
225          try {          try {
# Line 236  Line 236 
236      }      }
237    
238      /**      /**
239       * submit of Runnable throws RejectedExecutionException if       * submit(runnable) throws RejectedExecutionException if
240       * saturated.       * executor is saturated.
241       */       */
242      public void testExecute1() {      public void testExecute1() {
243          ThreadPoolExecutor p = new ThreadPoolExecutor(1,1, SHORT_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(1));          ThreadPoolExecutor p = new ThreadPoolExecutor(1,1, SHORT_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(1));
# Line 252  Line 252 
252      }      }
253    
254      /**      /**
255       * Completed submit of Callable throws RejectedExecutionException       * submit(callable) throws RejectedExecutionException
256       *  if saturated.       * if executor is saturated.
257       */       */
258      public void testExecute2() {      public void testExecute2() {
259           ThreadPoolExecutor p = new ThreadPoolExecutor(1,1, SHORT_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(1));           ThreadPoolExecutor p = new ThreadPoolExecutor(1,1, SHORT_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(1));
# Line 268  Line 268 
268    
269    
270      /**      /**
271       *  blocking on submit of Callable throws InterruptedException if       *  Blocking on submit(callable) throws InterruptedException if
272       *  caller interrupted.       *  caller interrupted.
273       */       */
274      public void testInterruptedSubmit() {      public void testInterruptedSubmit() {
# Line 304  Line 304 
304      }      }
305    
306      /**      /**
307       *  get of submit of Callable throws Exception if callable       *  get of submitted callable throws Exception if callable
308       *  interrupted       *  interrupted
309       */       */
310      public void testSubmitIE() {      public void testSubmitIE() {
# Line 344  Line 344 
344      }      }
345    
346      /**      /**
347       *  completed submit of Callable throws ExecutionException if       *  get of submit(callable) throws ExecutionException if callable
348       *  callable throws exception       *  throws exception
349       */       */
350      public void testSubmitEE() {      public void testSubmitEE() {
351          ThreadPoolExecutor p = new ThreadPoolExecutor(1,1,SHORT_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));          ThreadPoolExecutor p = new ThreadPoolExecutor(1,1,SHORT_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
# Line 421  Line 421 
421      }      }
422    
423      /**      /**
424       * invokeAny(c) throws ExecutionException if no task completes       * invokeAny(c) throws ExecutionException if no task in c completes
425       */       */
426      public void testInvokeAny4() {      public void testInvokeAny4() {
427          ExecutorService e = new DirectExecutorService();          ExecutorService e = new DirectExecutorService();
# Line 438  Line 438 
438      }      }
439    
440      /**      /**
441       * invokeAny(c) returns result of some task       * invokeAny(c) returns result of some task in c if at least one completes
442       */       */
443      public void testInvokeAny5() {      public void testInvokeAny5() {
444          ExecutorService e = new DirectExecutorService();          ExecutorService e = new DirectExecutorService();
# Line 505  Line 505 
505      }      }
506    
507      /**      /**
508       * get of element of invokeAll(c) throws exception on failed task       * get of returned element of invokeAll(c) throws exception on failed task
509       */       */
510      public void testInvokeAll4() {      public void testInvokeAll4() {
511          ExecutorService e = new DirectExecutorService();          ExecutorService e = new DirectExecutorService();
# Line 525  Line 525 
525      }      }
526    
527      /**      /**
528       * invokeAll(c) returns results of all completed tasks       * invokeAll(c) returns results of all completed tasks in c
529       */       */
530      public void testInvokeAll5() {      public void testInvokeAll5() {
531          ExecutorService e = new DirectExecutorService();          ExecutorService e = new DirectExecutorService();
# Line 562  Line 562 
562      }      }
563    
564      /**      /**
565       * timed invokeAny(,,null) throws NPE       * timed invokeAny(null time unit) throws NPE
566       */       */
567      public void testTimedInvokeAnyNullTimeUnit() {      public void testTimedInvokeAnyNullTimeUnit() {
568          ExecutorService e = new DirectExecutorService();          ExecutorService e = new DirectExecutorService();
# Line 630  Line 630 
630      }      }
631    
632      /**      /**
633       * timed invokeAny(c) returns result of some task       * timed invokeAny(c) returns result of some task in c
634       */       */
635      public void testTimedInvokeAny5() {      public void testTimedInvokeAny5() {
636          ExecutorService e = new DirectExecutorService();          ExecutorService e = new DirectExecutorService();
# Line 664  Line 664 
664      }      }
665    
666      /**      /**
667       * timed invokeAll(,,null) throws NPE       * timed invokeAll(null time unit) throws NPE
668       */       */
669      public void testTimedInvokeAllNullTimeUnit() {      public void testTimedInvokeAllNullTimeUnit() {
670          ExecutorService e = new DirectExecutorService();          ExecutorService e = new DirectExecutorService();
# Line 714  Line 714 
714      }      }
715    
716      /**      /**
717       * get of element of invokeAll(c) throws exception on failed task       * get of returned element of invokeAll(c) throws exception on failed task
718       */       */
719      public void testTimedInvokeAll4() {      public void testTimedInvokeAll4() {
720          ExecutorService e = new DirectExecutorService();          ExecutorService e = new DirectExecutorService();
# Line 734  Line 734 
734      }      }
735    
736      /**      /**
737       * timed invokeAll(c) returns results of all completed tasks       * timed invokeAll(c) returns results of all completed tasks in c
738       */       */
739      public void testTimedInvokeAll5() {      public void testTimedInvokeAll5() {
740          ExecutorService e = new DirectExecutorService();          ExecutorService e = new DirectExecutorService();
# Line 755  Line 755 
755      }      }
756    
757      /**      /**
758       * timed invokeAll(c) cancels tasks not completed by timeout       * timed invokeAll cancels tasks not completed by timeout
759       */       */
760      public void testTimedInvokeAll6() {      public void testTimedInvokeAll6() {
761          ExecutorService e = new DirectExecutorService();          ExecutorService e = new DirectExecutorService();

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8