[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.12, Mon Jan 12 16:37:40 2004 UTC revision 1.13, Mon Jan 12 19:39:21 2004 UTC
# Line 240  Line 240 
240       * executor is 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, 60, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(1));
244          try {          try {
245    
246              for(int i = 0; i < 5; ++i){              for(int i = 0; i < 5; ++i){
# Line 256  Line 256 
256       * if executor is 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, 60, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(1));
260          try {          try {
261              for(int i = 0; i < 5; ++i) {              for(int i = 0; i < 5; ++i) {
262                  p.submit(new SmallCallable());                  p.submit(new SmallCallable());
# Line 272  Line 272 
272       *  caller interrupted.       *  caller interrupted.
273       */       */
274      public void testInterruptedSubmit() {      public void testInterruptedSubmit() {
275          final ThreadPoolExecutor p = new ThreadPoolExecutor(1,1,SHORT_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));          final ThreadPoolExecutor p = new ThreadPoolExecutor(1,1,60, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(10));
276          Thread t = new Thread(new Runnable() {          Thread t = new Thread(new Runnable() {
277                  public void run() {                  public void run() {
278                      try {                      try {
# Line 308  Line 308 
308       *  interrupted       *  interrupted
309       */       */
310      public void testSubmitIE() {      public void testSubmitIE() {
311          final ThreadPoolExecutor p = new ThreadPoolExecutor(1,1,SHORT_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));          final ThreadPoolExecutor p = new ThreadPoolExecutor(1,1,60, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(10));
312    
313          final Callable c = new Callable() {          final Callable c = new Callable() {
314                  public Object call() {                  public Object call() {
# Line 348  Line 348 
348       *  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,60, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(10));
352    
353          try {          try {
354              Callable c = new Callable() {              Callable c = new Callable() {
# Line 764  Line 764 
764              l.add(new StringTask());              l.add(new StringTask());
765              l.add(Executors.callable(new MediumPossiblyInterruptedRunnable(), TEST_STRING));              l.add(Executors.callable(new MediumPossiblyInterruptedRunnable(), TEST_STRING));
766              l.add(new StringTask());              l.add(new StringTask());
767              List<Future<String>> result = e.invokeAll(l, SHORT_DELAY_MS, TimeUnit.MILLISECONDS);              List<Future<String>> result = e.invokeAll(l, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
768              assertEquals(3, result.size());              assertEquals(3, result.size());
769              Iterator<Future<String>> it = result.iterator();              Iterator<Future<String>> it = result.iterator();
770              Future<String> f1 = it.next();              Future<String> f1 = it.next();

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

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8