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

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

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

revision 1.30, Thu Apr 20 20:35:00 2006 UTC revision 1.31, Sun Apr 13 14:16:25 2008 UTC
# Line 281  Line 281 
281       * threadFail with message "should throw exception"       * threadFail with message "should throw exception"
282       */       */
283      public void threadShouldThrow() {      public void threadShouldThrow() {
284           try {
285          threadFailed = true;          threadFailed = true;
286          fail("should throw exception");          fail("should throw exception");
287           } catch (AssertionFailedError e) {
288               e.printStackTrace();
289               throw e;
290           }
291      }      }
292    
293      /**      /**
# Line 293  Line 298 
298          fail("Unexpected exception");          fail("Unexpected exception");
299      }      }
300    
301        /**
302         * threadFail with message "Unexpected exception", with argument
303         */
304        public void threadUnexpectedException(Throwable ex) {
305            threadFailed = true;
306            ex.printStackTrace();
307            fail("Unexpected exception: " + ex);
308        }
309    
310      /**      /**
311       * Wait out termination of a thread pool or fail doing so       * Wait out termination of a thread pool or fail doing so
# Line 402  Line 415 
415                  Thread.sleep(SHORT_DELAY_MS);                  Thread.sleep(SHORT_DELAY_MS);
416              }              }
417              catch(Exception e) {              catch(Exception e) {
418                  threadUnexpectedException();                  threadUnexpectedException(e);
419              }              }
420          }          }
421      }      }
# Line 424  Line 437 
437                  Thread.sleep(SMALL_DELAY_MS);                  Thread.sleep(SMALL_DELAY_MS);
438              }              }
439              catch(Exception e) {              catch(Exception e) {
440                  threadUnexpectedException();                  threadUnexpectedException(e);
441              }              }
442          }          }
443      }      }
# Line 445  Line 458 
458                  Thread.sleep(SMALL_DELAY_MS);                  Thread.sleep(SMALL_DELAY_MS);
459              }              }
460              catch(Exception e) {              catch(Exception e) {
461                  threadUnexpectedException();                  threadUnexpectedException(e);
462              }              }
463              return Boolean.TRUE;              return Boolean.TRUE;
464          }          }
# Line 469  Line 482 
482                  Thread.sleep(MEDIUM_DELAY_MS);                  Thread.sleep(MEDIUM_DELAY_MS);
483              }              }
484              catch(Exception e) {              catch(Exception e) {
485                  threadUnexpectedException();                  threadUnexpectedException(e);
486              }              }
487          }          }
488      }      }

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8