ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ThreadPoolExecutorTest.java
(Generate patch)

Comparing jsr166/src/test/tck/ThreadPoolExecutorTest.java (file contents):
Revision 1.25 by jsr166, Mon Nov 16 04:57:10 2009 UTC vs.
Revision 1.26 by jsr166, Mon Nov 16 05:30:08 2009 UTC

# Line 37 | Line 37 | public class ThreadPoolExecutorTest exte
37          }
38      }
39  
40 <    static class FailingThreadFactory implements ThreadFactory{
40 >    static class FailingThreadFactory implements ThreadFactory {
41          int calls = 0;
42 <        public Thread newThread(Runnable r){
42 >        public Thread newThread(Runnable r) {
43              if (++calls > 1) return null;
44              return new Thread(r);
45          }
# Line 56 | Line 56 | public class ThreadPoolExecutorTest exte
56                      public void run() {
57                          try {
58                              Thread.sleep(SHORT_DELAY_MS);
59 <                        } catch (InterruptedException e){
59 >                        } catch (InterruptedException e) {
60                              threadUnexpectedException();
61                          }
62                      }
63                  });
64              Thread.sleep(SMALL_DELAY_MS);
65 <        } catch (InterruptedException e){
65 >        } catch (InterruptedException e) {
66              unexpectedException();
67          }
68          joinPool(p1);
# Line 78 | Line 78 | public class ThreadPoolExecutorTest exte
78          p2.execute(new MediumRunnable());
79          try {
80              Thread.sleep(SHORT_DELAY_MS);
81 <        } catch (Exception e){
81 >        } catch (Exception e) {
82              unexpectedException();
83          }
84          assertEquals(1, p2.getActiveCount());
# Line 123 | Line 123 | public class ThreadPoolExecutorTest exte
123          p2.execute(new ShortRunnable());
124          try {
125              Thread.sleep(SMALL_DELAY_MS);
126 <        } catch (Exception e){
126 >        } catch (Exception e) {
127              unexpectedException();
128          }
129          assertEquals(1, p2.getCompletedTaskCount());
# Line 236 | Line 236 | public class ThreadPoolExecutorTest exte
236              p2.execute(new MediumRunnable());
237              Thread.sleep(SHORT_DELAY_MS);
238              assertEquals(2, p2.getLargestPoolSize());
239 <        } catch (Exception e){
239 >        } catch (Exception e) {
240              unexpectedException();
241          }
242          joinPool(p2);
# Line 274 | Line 274 | public class ThreadPoolExecutorTest exte
274              p1.execute(new MediumRunnable());
275              Thread.sleep(SHORT_DELAY_MS);
276              assertEquals(1, p1.getTaskCount());
277 <        } catch (Exception e){
277 >        } catch (Exception e) {
278              unexpectedException();
279          }
280          joinPool(p1);
# Line 307 | Line 307 | public class ThreadPoolExecutorTest exte
307          try {
308              assertTrue(p1.awaitTermination(LONG_DELAY_MS, TimeUnit.MILLISECONDS));
309              assertTrue(p1.isTerminated());
310 <        } catch (Exception e){
310 >        } catch (Exception e) {
311              unexpectedException();
312          }
313      }
# Line 328 | Line 328 | public class ThreadPoolExecutorTest exte
328              assertTrue(p1.awaitTermination(LONG_DELAY_MS, TimeUnit.MILLISECONDS));
329              assertTrue(p1.isTerminated());
330              assertFalse(p1.isTerminating());
331 <        } catch (Exception e){
331 >        } catch (Exception e) {
332              unexpectedException();
333          }
334      }
# Line 340 | Line 340 | public class ThreadPoolExecutorTest exte
340          BlockingQueue<Runnable> q = new ArrayBlockingQueue<Runnable>(10);
341          ThreadPoolExecutor p1 = new ThreadPoolExecutor(1, 1, LONG_DELAY_MS, TimeUnit.MILLISECONDS, q);
342          FutureTask[] tasks = new FutureTask[5];
343 <        for (int i = 0; i < 5; i++){
343 >        for (int i = 0; i < 5; i++) {
344              tasks[i] = new FutureTask(new MediumPossiblyInterruptedRunnable(), Boolean.TRUE);
345              p1.execute(tasks[i]);
346          }
# Line 367 | Line 367 | public class ThreadPoolExecutorTest exte
367          BlockingQueue<Runnable> q = new ArrayBlockingQueue<Runnable>(10);
368          ThreadPoolExecutor p1 = new ThreadPoolExecutor(1, 1, LONG_DELAY_MS, TimeUnit.MILLISECONDS, q);
369          FutureTask[] tasks = new FutureTask[5];
370 <        for (int i = 0; i < 5; i++){
370 >        for (int i = 0; i < 5; i++) {
371              tasks[i] = new FutureTask(new MediumPossiblyInterruptedRunnable(), Boolean.TRUE);
372              p1.execute(tasks[i]);
373          }
# Line 395 | Line 395 | public class ThreadPoolExecutorTest exte
395      public void testPurge() {
396          ThreadPoolExecutor p1 = new ThreadPoolExecutor(1, 1, LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
397          FutureTask[] tasks = new FutureTask[5];
398 <        for (int i = 0; i < 5; i++){
398 >        for (int i = 0; i < 5; i++) {
399              tasks[i] = new FutureTask(new MediumPossiblyInterruptedRunnable(), Boolean.TRUE);
400              p1.execute(tasks[i]);
401          }
# Line 438 | Line 438 | public class ThreadPoolExecutorTest exte
438              new ThreadPoolExecutor(-1,1,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
439              shouldThrow();
440          }
441 <        catch (IllegalArgumentException success){}
441 >        catch (IllegalArgumentException success) {}
442      }
443  
444      /**
# Line 449 | Line 449 | public class ThreadPoolExecutorTest exte
449              new ThreadPoolExecutor(1,-1,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
450              shouldThrow();
451          }
452 <        catch (IllegalArgumentException success){}
452 >        catch (IllegalArgumentException success) {}
453      }
454  
455      /**
# Line 460 | Line 460 | public class ThreadPoolExecutorTest exte
460              new ThreadPoolExecutor(1,0,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
461              shouldThrow();
462          }
463 <        catch (IllegalArgumentException success){}
463 >        catch (IllegalArgumentException success) {}
464      }
465  
466      /**
# Line 471 | Line 471 | public class ThreadPoolExecutorTest exte
471              new ThreadPoolExecutor(1,2,-1L,TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
472              shouldThrow();
473          }
474 <        catch (IllegalArgumentException success){}
474 >        catch (IllegalArgumentException success) {}
475      }
476  
477      /**
# Line 482 | Line 482 | public class ThreadPoolExecutorTest exte
482              new ThreadPoolExecutor(2,1,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
483              shouldThrow();
484          }
485 <        catch (IllegalArgumentException success){}
485 >        catch (IllegalArgumentException success) {}
486      }
487  
488      /**
# Line 493 | Line 493 | public class ThreadPoolExecutorTest exte
493              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, TimeUnit.MILLISECONDS,null);
494              shouldThrow();
495          }
496 <        catch (NullPointerException success){}
496 >        catch (NullPointerException success) {}
497      }
498  
499  
# Line 505 | Line 505 | public class ThreadPoolExecutorTest exte
505          try {
506              new ThreadPoolExecutor(-1,1,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory());
507              shouldThrow();
508 <        } catch (IllegalArgumentException success){}
508 >        } catch (IllegalArgumentException success) {}
509      }
510  
511      /**
# Line 516 | Line 516 | public class ThreadPoolExecutorTest exte
516              new ThreadPoolExecutor(1,-1,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory());
517              shouldThrow();
518          }
519 <        catch (IllegalArgumentException success){}
519 >        catch (IllegalArgumentException success) {}
520      }
521  
522      /**
# Line 527 | Line 527 | public class ThreadPoolExecutorTest exte
527              new ThreadPoolExecutor(1,0,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory());
528              shouldThrow();
529          }
530 <        catch (IllegalArgumentException success){}
530 >        catch (IllegalArgumentException success) {}
531      }
532  
533      /**
# Line 538 | Line 538 | public class ThreadPoolExecutorTest exte
538              new ThreadPoolExecutor(1,2,-1L,TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory());
539              shouldThrow();
540          }
541 <        catch (IllegalArgumentException success){}
541 >        catch (IllegalArgumentException success) {}
542      }
543  
544      /**
# Line 549 | Line 549 | public class ThreadPoolExecutorTest exte
549              new ThreadPoolExecutor(2,1,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory());
550              shouldThrow();
551          }
552 <        catch (IllegalArgumentException success){}
552 >        catch (IllegalArgumentException success) {}
553      }
554  
555      /**
# Line 560 | Line 560 | public class ThreadPoolExecutorTest exte
560              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, TimeUnit.MILLISECONDS,null,new SimpleThreadFactory());
561              shouldThrow();
562          }
563 <        catch (NullPointerException success){}
563 >        catch (NullPointerException success) {}
564      }
565  
566      /**
# Line 572 | Line 572 | public class ThreadPoolExecutorTest exte
572              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, TimeUnit.MILLISECONDS,new ArrayBlockingQueue<Runnable>(10),f);
573              shouldThrow();
574          }
575 <        catch (NullPointerException success){}
575 >        catch (NullPointerException success) {}
576      }
577  
578  
# Line 584 | Line 584 | public class ThreadPoolExecutorTest exte
584              new ThreadPoolExecutor(-1,1,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new NoOpREHandler());
585              shouldThrow();
586          }
587 <        catch (IllegalArgumentException success){}
587 >        catch (IllegalArgumentException success) {}
588      }
589  
590      /**
# Line 595 | Line 595 | public class ThreadPoolExecutorTest exte
595              new ThreadPoolExecutor(1,-1,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new NoOpREHandler());
596              shouldThrow();
597          }
598 <        catch (IllegalArgumentException success){}
598 >        catch (IllegalArgumentException success) {}
599      }
600  
601      /**
# Line 606 | Line 606 | public class ThreadPoolExecutorTest exte
606              new ThreadPoolExecutor(1,0,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new NoOpREHandler());
607              shouldThrow();
608          }
609 <        catch (IllegalArgumentException success){}
609 >        catch (IllegalArgumentException success) {}
610      }
611  
612      /**
# Line 617 | Line 617 | public class ThreadPoolExecutorTest exte
617              new ThreadPoolExecutor(1,2,-1L,TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new NoOpREHandler());
618              shouldThrow();
619          }
620 <        catch (IllegalArgumentException success){}
620 >        catch (IllegalArgumentException success) {}
621      }
622  
623      /**
# Line 628 | Line 628 | public class ThreadPoolExecutorTest exte
628              new ThreadPoolExecutor(2,1,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new NoOpREHandler());
629              shouldThrow();
630          }
631 <        catch (IllegalArgumentException success){}
631 >        catch (IllegalArgumentException success) {}
632      }
633  
634      /**
# Line 639 | Line 639 | public class ThreadPoolExecutorTest exte
639              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, TimeUnit.MILLISECONDS,null,new NoOpREHandler());
640              shouldThrow();
641          }
642 <        catch (NullPointerException success){}
642 >        catch (NullPointerException success) {}
643      }
644  
645      /**
# Line 651 | Line 651 | public class ThreadPoolExecutorTest exte
651              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, TimeUnit.MILLISECONDS,new ArrayBlockingQueue<Runnable>(10),r);
652              shouldThrow();
653          }
654 <        catch (NullPointerException success){}
654 >        catch (NullPointerException success) {}
655      }
656  
657  
# Line 663 | Line 663 | public class ThreadPoolExecutorTest exte
663              new ThreadPoolExecutor(-1,1,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory(),new NoOpREHandler());
664              shouldThrow();
665          }
666 <        catch (IllegalArgumentException success){}
666 >        catch (IllegalArgumentException success) {}
667      }
668  
669      /**
# Line 674 | Line 674 | public class ThreadPoolExecutorTest exte
674              new ThreadPoolExecutor(1,-1,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory(),new NoOpREHandler());
675              shouldThrow();
676          }
677 <        catch (IllegalArgumentException success){}
677 >        catch (IllegalArgumentException success) {}
678      }
679  
680      /**
# Line 685 | Line 685 | public class ThreadPoolExecutorTest exte
685              new ThreadPoolExecutor(1,0,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory(),new NoOpREHandler());
686              shouldThrow();
687          }
688 <        catch (IllegalArgumentException success){}
688 >        catch (IllegalArgumentException success) {}
689      }
690  
691      /**
# Line 696 | Line 696 | public class ThreadPoolExecutorTest exte
696              new ThreadPoolExecutor(1,2,-1L,TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory(),new NoOpREHandler());
697              shouldThrow();
698          }
699 <        catch (IllegalArgumentException success){}
699 >        catch (IllegalArgumentException success) {}
700      }
701  
702      /**
# Line 707 | Line 707 | public class ThreadPoolExecutorTest exte
707              new ThreadPoolExecutor(2,1,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory(),new NoOpREHandler());
708              shouldThrow();
709          }
710 <        catch (IllegalArgumentException success){}
710 >        catch (IllegalArgumentException success) {}
711      }
712  
713      /**
# Line 718 | Line 718 | public class ThreadPoolExecutorTest exte
718              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, TimeUnit.MILLISECONDS,null,new SimpleThreadFactory(),new NoOpREHandler());
719              shouldThrow();
720          }
721 <        catch (NullPointerException success){}
721 >        catch (NullPointerException success) {}
722      }
723  
724      /**
# Line 730 | Line 730 | public class ThreadPoolExecutorTest exte
730              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, TimeUnit.MILLISECONDS,new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory(),r);
731              shouldThrow();
732          }
733 <        catch (NullPointerException success){}
733 >        catch (NullPointerException success) {}
734      }
735  
736      /**
# Line 742 | Line 742 | public class ThreadPoolExecutorTest exte
742              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, TimeUnit.MILLISECONDS,new ArrayBlockingQueue<Runnable>(10),f,new NoOpREHandler());
743              shouldThrow();
744          }
745 <        catch (NullPointerException successdn8){}
745 >        catch (NullPointerException successdn8) {}
746      }
747  
748  
# Line 754 | Line 754 | public class ThreadPoolExecutorTest exte
754          ThreadPoolExecutor p = new ThreadPoolExecutor(1,1, LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(1));
755          try {
756  
757 <            for (int i = 0; i < 5; ++i){
757 >            for (int i = 0; i < 5; ++i) {
758                  p.execute(new MediumRunnable());
759              }
760              shouldThrow();
761 <        } catch (RejectedExecutionException success){}
761 >        } catch (RejectedExecutionException success) {}
762          joinPool(p);
763      }
764  
# Line 771 | Line 771 | public class ThreadPoolExecutorTest exte
771          try {
772  
773              TrackedNoOpRunnable[] tasks = new TrackedNoOpRunnable[5];
774 <            for (int i = 0; i < 5; ++i){
774 >            for (int i = 0; i < 5; ++i) {
775                  tasks[i] = new TrackedNoOpRunnable();
776              }
777              TrackedLongRunnable mr = new TrackedLongRunnable();
778              p.execute(mr);
779 <            for (int i = 0; i < 5; ++i){
779 >            for (int i = 0; i < 5; ++i) {
780                  p.execute(tasks[i]);
781              }
782              for (int i = 1; i < 5; ++i) {
783                  assertTrue(tasks[i].done);
784              }
785              try { p.shutdownNow(); } catch (SecurityException ok) { return; }
786 <        } catch (RejectedExecutionException ex){
786 >        } catch (RejectedExecutionException ex) {
787              unexpectedException();
788          } finally {
789              joinPool(p);
# Line 799 | Line 799 | public class ThreadPoolExecutorTest exte
799          try {
800  
801              TrackedNoOpRunnable[] tasks = new TrackedNoOpRunnable[5];
802 <            for (int i = 0; i < 5; ++i){
802 >            for (int i = 0; i < 5; ++i) {
803                  tasks[i] = new TrackedNoOpRunnable();
804              }
805              p.execute(new TrackedLongRunnable());
806 <            for (int i = 0; i < 5; ++i){
806 >            for (int i = 0; i < 5; ++i) {
807                  p.execute(tasks[i]);
808              }
809 <            for (int i = 0; i < 5; ++i){
809 >            for (int i = 0; i < 5; ++i) {
810                  assertFalse(tasks[i].done);
811              }
812              try { p.shutdownNow(); } catch (SecurityException ok) { return; }
813 <        } catch (RejectedExecutionException ex){
813 >        } catch (RejectedExecutionException ex) {
814              unexpectedException();
815          } finally {
816              joinPool(p);
# Line 833 | Line 833 | public class ThreadPoolExecutorTest exte
833              assertFalse(p.getQueue().contains(r2));
834              assertTrue(p.getQueue().contains(r3));
835              try { p.shutdownNow(); } catch (SecurityException ok) { return; }
836 <        } catch (RejectedExecutionException ex){
836 >        } catch (RejectedExecutionException ex) {
837              unexpectedException();
838          } finally {
839              joinPool(p);
# Line 850 | Line 850 | public class ThreadPoolExecutorTest exte
850          try {
851              tpe.execute(new NoOpRunnable());
852              shouldThrow();
853 <        } catch (RejectedExecutionException success){}
853 >        } catch (RejectedExecutionException success) {}
854  
855          joinPool(tpe);
856      }
# Line 867 | Line 867 | public class ThreadPoolExecutorTest exte
867              TrackedNoOpRunnable r = new TrackedNoOpRunnable();
868              p.execute(r);
869              assertFalse(r.done);
870 <        } catch (RejectedExecutionException success){
870 >        } catch (RejectedExecutionException success) {
871              unexpectedException();
872          } finally {
873              joinPool(p);
# Line 886 | Line 886 | public class ThreadPoolExecutorTest exte
886              TrackedNoOpRunnable r = new TrackedNoOpRunnable();
887              p.execute(r);
888              assertFalse(r.done);
889 <        } catch (RejectedExecutionException success){
889 >        } catch (RejectedExecutionException success) {
890              unexpectedException();
891          } finally {
892              joinPool(p);
# Line 906 | Line 906 | public class ThreadPoolExecutorTest exte
906              TrackedNoOpRunnable r = new TrackedNoOpRunnable();
907              p.execute(r);
908              assertFalse(r.done);
909 <        } catch (RejectedExecutionException success){
909 >        } catch (RejectedExecutionException success) {
910              unexpectedException();
911          } finally {
912              joinPool(p);
# Line 923 | Line 923 | public class ThreadPoolExecutorTest exte
923              tpe = new ThreadPoolExecutor(1,2,LONG_DELAY_MS, TimeUnit.MILLISECONDS,new ArrayBlockingQueue<Runnable>(10));
924              tpe.execute(null);
925              shouldThrow();
926 <        } catch (NullPointerException success){}
926 >        } catch (NullPointerException success) {}
927  
928          joinPool(tpe);
929      }
# Line 935 | Line 935 | public class ThreadPoolExecutorTest exte
935          ThreadPoolExecutor tpe = null;
936          try {
937              tpe = new ThreadPoolExecutor(1,2,LONG_DELAY_MS, TimeUnit.MILLISECONDS,new ArrayBlockingQueue<Runnable>(10));
938 <        } catch (Exception e){}
938 >        } catch (Exception e) {}
939          try {
940              tpe.setCorePoolSize(-1);
941              shouldThrow();
942 <        } catch (IllegalArgumentException success){
942 >        } catch (IllegalArgumentException success) {
943          } finally {
944              try { tpe.shutdown(); } catch (SecurityException ok) { return; }
945          }
# Line 954 | Line 954 | public class ThreadPoolExecutorTest exte
954          ThreadPoolExecutor tpe = null;
955          try {
956              tpe = new ThreadPoolExecutor(2,3,LONG_DELAY_MS, TimeUnit.MILLISECONDS,new ArrayBlockingQueue<Runnable>(10));
957 <        } catch (Exception e){}
957 >        } catch (Exception e) {}
958          try {
959              tpe.setMaximumPoolSize(1);
960              shouldThrow();
961 <        } catch (IllegalArgumentException success){
961 >        } catch (IllegalArgumentException success) {
962          } finally {
963              try { tpe.shutdown(); } catch (SecurityException ok) { return; }
964          }
# Line 973 | Line 973 | public class ThreadPoolExecutorTest exte
973          ThreadPoolExecutor tpe = null;
974          try {
975              tpe = new ThreadPoolExecutor(2,3,LONG_DELAY_MS, TimeUnit.MILLISECONDS,new ArrayBlockingQueue<Runnable>(10));
976 <        } catch (Exception e){}
976 >        } catch (Exception e) {}
977          try {
978              tpe.setMaximumPoolSize(-1);
979              shouldThrow();
980 <        } catch (IllegalArgumentException success){
980 >        } catch (IllegalArgumentException success) {
981          } finally {
982              try { tpe.shutdown(); } catch (SecurityException ok) { return; }
983          }
# Line 993 | Line 993 | public class ThreadPoolExecutorTest exte
993          ThreadPoolExecutor tpe = null;
994          try {
995              tpe = new ThreadPoolExecutor(2,3,LONG_DELAY_MS, TimeUnit.MILLISECONDS,new ArrayBlockingQueue<Runnable>(10));
996 <        } catch (Exception e){}
996 >        } catch (Exception e) {}
997  
998          try {
999              tpe.setKeepAliveTime(-1,TimeUnit.MILLISECONDS);
1000              shouldThrow();
1001 <        } catch (IllegalArgumentException success){
1001 >        } catch (IllegalArgumentException success) {
1002          } finally {
1003              try { tpe.shutdown(); } catch (SecurityException ok) { return; }
1004          }
# Line 1549 | Line 1549 | public class ThreadPoolExecutorTest exte
1549          try {
1550              Thread.sleep(MEDIUM_DELAY_MS);
1551              assertEquals(0, tpe.getPoolSize());
1552 <        } catch (InterruptedException e){
1552 >        } catch (InterruptedException e) {
1553              unexpectedException();
1554          } finally {
1555              joinPool(tpe);
# Line 1566 | Line 1566 | public class ThreadPoolExecutorTest exte
1566          try {
1567              Thread.sleep(MEDIUM_DELAY_MS);
1568              assertTrue(tpe.getPoolSize() >= 1);
1569 <        } catch (InterruptedException e){
1569 >        } catch (InterruptedException e) {
1570              unexpectedException();
1571          } finally {
1572              joinPool(tpe);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines