Example #1
0
 private StatementThread evaluateStatement() throws InterruptedException {
   StatementThread localStatementThread = new StatementThread(this.fOriginalStatement);
   localStatementThread.start();
   localStatementThread.join(this.fTimeout);
   if (!localStatementThread.fFinished) {
     localStatementThread.recordStackTrace();
   }
   localStatementThread.interrupt();
   return localStatementThread;
 }
Example #2
0
 private void throwTimeoutException(StatementThread paramStatementThread) throws Exception {
   Exception localException =
       new Exception(
           String.format(
               "test timed out after %d milliseconds",
               new Object[] {Long.valueOf(this.fTimeout)}));
   localException.setStackTrace(paramStatementThread.getRecordedStackTrace());
   throw localException;
 }