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.27 by jsr166, Wed Nov 18 05:39:51 2009 UTC vs.
Revision 1.28 by jsr166, Wed Nov 18 16:13:11 2009 UTC

# Line 401 | Line 401 | public class ThreadPoolExecutorTest exte
401          try {
402              new ThreadPoolExecutor(-1,1,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
403              shouldThrow();
404 <        }
405 <        catch (IllegalArgumentException success) {}
404 >        } catch (IllegalArgumentException success) {}
405      }
406  
407      /**
# Line 412 | Line 411 | public class ThreadPoolExecutorTest exte
411          try {
412              new ThreadPoolExecutor(1,-1,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
413              shouldThrow();
414 <        }
416 <        catch (IllegalArgumentException success) {}
414 >        } catch (IllegalArgumentException success) {}
415      }
416  
417      /**
# Line 423 | Line 421 | public class ThreadPoolExecutorTest exte
421          try {
422              new ThreadPoolExecutor(1,0,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
423              shouldThrow();
424 <        }
427 <        catch (IllegalArgumentException success) {}
424 >        } catch (IllegalArgumentException success) {}
425      }
426  
427      /**
# Line 434 | Line 431 | public class ThreadPoolExecutorTest exte
431          try {
432              new ThreadPoolExecutor(1,2,-1L,MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
433              shouldThrow();
434 <        }
438 <        catch (IllegalArgumentException success) {}
434 >        } catch (IllegalArgumentException success) {}
435      }
436  
437      /**
# Line 445 | Line 441 | public class ThreadPoolExecutorTest exte
441          try {
442              new ThreadPoolExecutor(2,1,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
443              shouldThrow();
444 <        }
449 <        catch (IllegalArgumentException success) {}
444 >        } catch (IllegalArgumentException success) {}
445      }
446  
447      /**
# Line 456 | Line 451 | public class ThreadPoolExecutorTest exte
451          try {
452              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, MILLISECONDS,null);
453              shouldThrow();
454 <        }
460 <        catch (NullPointerException success) {}
454 >        } catch (NullPointerException success) {}
455      }
456  
457  
# Line 469 | Line 463 | public class ThreadPoolExecutorTest exte
463          try {
464              new ThreadPoolExecutor(-1,1,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory());
465              shouldThrow();
466 <        }
473 <        catch (IllegalArgumentException success) {}
466 >        } catch (IllegalArgumentException success) {}
467      }
468  
469      /**
# Line 480 | Line 473 | public class ThreadPoolExecutorTest exte
473          try {
474              new ThreadPoolExecutor(1,-1,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory());
475              shouldThrow();
476 <        }
484 <        catch (IllegalArgumentException success) {}
476 >        } catch (IllegalArgumentException success) {}
477      }
478  
479      /**
# Line 491 | Line 483 | public class ThreadPoolExecutorTest exte
483          try {
484              new ThreadPoolExecutor(1,0,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory());
485              shouldThrow();
486 <        }
495 <        catch (IllegalArgumentException success) {}
486 >        } catch (IllegalArgumentException success) {}
487      }
488  
489      /**
# Line 502 | Line 493 | public class ThreadPoolExecutorTest exte
493          try {
494              new ThreadPoolExecutor(1,2,-1L,MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory());
495              shouldThrow();
496 <        }
506 <        catch (IllegalArgumentException success) {}
496 >        } catch (IllegalArgumentException success) {}
497      }
498  
499      /**
# Line 513 | Line 503 | public class ThreadPoolExecutorTest exte
503          try {
504              new ThreadPoolExecutor(2,1,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory());
505              shouldThrow();
506 <        }
517 <        catch (IllegalArgumentException success) {}
506 >        } catch (IllegalArgumentException success) {}
507      }
508  
509      /**
# Line 524 | Line 513 | public class ThreadPoolExecutorTest exte
513          try {
514              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, MILLISECONDS,null,new SimpleThreadFactory());
515              shouldThrow();
516 <        }
528 <        catch (NullPointerException success) {}
516 >        } catch (NullPointerException success) {}
517      }
518  
519      /**
# Line 536 | Line 524 | public class ThreadPoolExecutorTest exte
524              ThreadFactory f = null;
525              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, MILLISECONDS,new ArrayBlockingQueue<Runnable>(10),f);
526              shouldThrow();
527 <        }
540 <        catch (NullPointerException success) {}
527 >        } catch (NullPointerException success) {}
528      }
529  
530  
# Line 548 | Line 535 | public class ThreadPoolExecutorTest exte
535          try {
536              new ThreadPoolExecutor(-1,1,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new NoOpREHandler());
537              shouldThrow();
538 <        }
552 <        catch (IllegalArgumentException success) {}
538 >        } catch (IllegalArgumentException success) {}
539      }
540  
541      /**
# Line 559 | Line 545 | public class ThreadPoolExecutorTest exte
545          try {
546              new ThreadPoolExecutor(1,-1,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new NoOpREHandler());
547              shouldThrow();
548 <        }
563 <        catch (IllegalArgumentException success) {}
548 >        } catch (IllegalArgumentException success) {}
549      }
550  
551      /**
# Line 570 | Line 555 | public class ThreadPoolExecutorTest exte
555          try {
556              new ThreadPoolExecutor(1,0,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new NoOpREHandler());
557              shouldThrow();
558 <        }
574 <        catch (IllegalArgumentException success) {}
558 >        } catch (IllegalArgumentException success) {}
559      }
560  
561      /**
# Line 581 | Line 565 | public class ThreadPoolExecutorTest exte
565          try {
566              new ThreadPoolExecutor(1,2,-1L,MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new NoOpREHandler());
567              shouldThrow();
568 <        }
585 <        catch (IllegalArgumentException success) {}
568 >        } catch (IllegalArgumentException success) {}
569      }
570  
571      /**
# Line 592 | Line 575 | public class ThreadPoolExecutorTest exte
575          try {
576              new ThreadPoolExecutor(2,1,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new NoOpREHandler());
577              shouldThrow();
578 <        }
596 <        catch (IllegalArgumentException success) {}
578 >        } catch (IllegalArgumentException success) {}
579      }
580  
581      /**
# Line 603 | Line 585 | public class ThreadPoolExecutorTest exte
585          try {
586              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, MILLISECONDS,null,new NoOpREHandler());
587              shouldThrow();
588 <        }
607 <        catch (NullPointerException success) {}
588 >        } catch (NullPointerException success) {}
589      }
590  
591      /**
# Line 615 | Line 596 | public class ThreadPoolExecutorTest exte
596              RejectedExecutionHandler r = null;
597              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, MILLISECONDS,new ArrayBlockingQueue<Runnable>(10),r);
598              shouldThrow();
599 <        }
619 <        catch (NullPointerException success) {}
599 >        } catch (NullPointerException success) {}
600      }
601  
602  
# Line 627 | Line 607 | public class ThreadPoolExecutorTest exte
607          try {
608              new ThreadPoolExecutor(-1,1,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory(),new NoOpREHandler());
609              shouldThrow();
610 <        }
631 <        catch (IllegalArgumentException success) {}
610 >        } catch (IllegalArgumentException success) {}
611      }
612  
613      /**
# Line 638 | Line 617 | public class ThreadPoolExecutorTest exte
617          try {
618              new ThreadPoolExecutor(1,-1,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory(),new NoOpREHandler());
619              shouldThrow();
620 <        }
642 <        catch (IllegalArgumentException success) {}
620 >        } catch (IllegalArgumentException success) {}
621      }
622  
623      /**
# Line 649 | Line 627 | public class ThreadPoolExecutorTest exte
627          try {
628              new ThreadPoolExecutor(1,0,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory(),new NoOpREHandler());
629              shouldThrow();
630 <        }
653 <        catch (IllegalArgumentException success) {}
630 >        } catch (IllegalArgumentException success) {}
631      }
632  
633      /**
# Line 660 | Line 637 | public class ThreadPoolExecutorTest exte
637          try {
638              new ThreadPoolExecutor(1,2,-1L,MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory(),new NoOpREHandler());
639              shouldThrow();
640 <        }
664 <        catch (IllegalArgumentException success) {}
640 >        } catch (IllegalArgumentException success) {}
641      }
642  
643      /**
# Line 671 | Line 647 | public class ThreadPoolExecutorTest exte
647          try {
648              new ThreadPoolExecutor(2,1,LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory(),new NoOpREHandler());
649              shouldThrow();
650 <        }
675 <        catch (IllegalArgumentException success) {}
650 >        } catch (IllegalArgumentException success) {}
651      }
652  
653      /**
# Line 682 | Line 657 | public class ThreadPoolExecutorTest exte
657          try {
658              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, MILLISECONDS,null,new SimpleThreadFactory(),new NoOpREHandler());
659              shouldThrow();
660 <        }
686 <        catch (NullPointerException success) {}
660 >        } catch (NullPointerException success) {}
661      }
662  
663      /**
# Line 694 | Line 668 | public class ThreadPoolExecutorTest exte
668              RejectedExecutionHandler r = null;
669              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, MILLISECONDS,new ArrayBlockingQueue<Runnable>(10),new SimpleThreadFactory(),r);
670              shouldThrow();
671 <        }
698 <        catch (NullPointerException success) {}
671 >        } catch (NullPointerException success) {}
672      }
673  
674      /**
# Line 706 | Line 679 | public class ThreadPoolExecutorTest exte
679              ThreadFactory f = null;
680              new ThreadPoolExecutor(1,2,LONG_DELAY_MS, MILLISECONDS,new ArrayBlockingQueue<Runnable>(10),f,new NoOpREHandler());
681              shouldThrow();
682 <        }
710 <        catch (NullPointerException success) {}
682 >        } catch (NullPointerException success) {}
683      }
684  
685  
# Line 878 | Line 850 | public class ThreadPoolExecutorTest exte
850       *  execute (null) throws NPE
851       */
852      public void testExecuteNull() {
853 <        ThreadPoolExecutor tpe = null;
853 >        ThreadPoolExecutor tpe = new ThreadPoolExecutor(1,2,LONG_DELAY_MS, MILLISECONDS,new ArrayBlockingQueue<Runnable>(10));
854          try {
883            tpe = new ThreadPoolExecutor(1,2,LONG_DELAY_MS, MILLISECONDS,new ArrayBlockingQueue<Runnable>(10));
855              tpe.execute(null);
856              shouldThrow();
857          } catch (NullPointerException success) {}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines