Examples of waitForResult()


Examples of cn.org.rapid_framework.util.concurrent.async.AsyncToken.waitForResult()

  @Test
  public void testSendFromOrderMailer() throws TemplateException, IOException, Exception {
    AsyncToken token = orderMailer.sendConfirmOrder("badqiu");
   
    //waitForResult主要用于测试,请使用相同功能的Future.get()
    token.waitForResult();
  }
 
}
View Full Code Here

Examples of com.alibaba.otter.shared.common.utils.thread.ExecutorTemplate.waitForResult()

            }

            long start = System.currentTimeMillis();
            logger.info("start pipelinep[{}] waitFor FileData Size : {} ", pipeline.getId(), fileDatas.size());
            // 等待所有都处理完成
            executorTemplate.waitForResult();
            logger.info("end pipelinep[{}] waitFor FileData cost : {} ms ", pipeline.getId(),
                        (System.currentTimeMillis() - start));
        } finally {
            if (executorTemplate != null) {
                executorTemplateGetter.release(executorTemplate);
View Full Code Here

Examples of com.alibaba.otter.shared.common.utils.thread.ExecutorTemplate.waitForResult()

                        }
                    });
                }
            }
            // 等待所有都处理完成
            executorTemplate.waitForResult();

            if (pipeline.getParameters().getDumpEvent() && logger.isInfoEnabled()) {
                logger.info(FileloadDumper.dumpFilterFileDatas(fileBatch.getIdentity(), fileBatch.getFiles().size(),
                                                               result.size(), filter));
            }
View Full Code Here

Examples of com.alibaba.otter.shared.common.utils.thread.ExecutorTemplate.waitForResult()

            }

            long start = System.currentTimeMillis();
            logger.info("start pipelinep[{}] waitFor FileData Size : {} ", pipeline.getId(), fileDatas.size());
            // 等待所有都处理完成
            executorTemplate.waitForResult();
            logger.info("end pipelinep[{}] waitFor FileData cost : {} ms ", pipeline.getId(),
                        (System.currentTimeMillis() - start));
        } finally {
            if (executorTemplate != null) {
                executorTemplateGetter.release(executorTemplate);
View Full Code Here

Examples of com.alibaba.otter.shared.common.utils.thread.ExecutorTemplate.waitForResult()

                }

            }

            // 等待所有都处理完成
            executorTemplate.waitForResult();

            if (!CollectionUtils.isEmpty(removeDatas)) {
                eventDatas.removeAll(removeDatas);
            }
        } finally {
View Full Code Here

Examples of org.apache.hadoop.test.GenericTestUtils.DelayAnswer.waitForResult()

    // Make sure that the checkpoint is still going on, implying that the client
    // RPC to the SBN happened during the checkpoint.
    assertTrue("SBN should have still been checkpointing.",
        answerer.getFireCount() == 1 && answerer.getResultCount() == 0);
    answerer.proceed();
    answerer.waitForResult();
    assertTrue("SBN should have finished checkpointing.",
        answerer.getFireCount() == 1 && answerer.getResultCount() == 1);
  }
 
  @Test(timeout=300000)
View Full Code Here

Examples of org.apache.hadoop.test.GenericTestUtils.DelayAnswer.waitForResult()

    // Make sure that the checkpoint is still going on, implying that the client
    // RPC to the SBN happened during the checkpoint.
    assertTrue("SBN should have still been checkpointing.",
        answerer.getFireCount() == 1 && answerer.getResultCount() == 0);
    answerer.proceed();
    answerer.waitForResult();
    assertTrue("SBN should have finished checkpointing.",
        answerer.getFireCount() == 1 && answerer.getResultCount() == 1);
   
    t.join();
  }
View Full Code Here

Examples of org.apache.hadoop.test.GenericTestUtils.DelayAnswer.waitForResult()

      cluster.transitionToActive(1);
     
      // Let the commitBlockSynchronization call go through, and check that
      // it failed with the correct exception.
      delayer.proceed();
      delayer.waitForResult();
      Throwable t = delayer.getThrown();
      if (t == null) {
        fail("commitBlockSynchronization call did not fail on standby");
      }
      GenericTestUtils.assertExceptionContains(
View Full Code Here

Examples of org.apache.hadoop.test.GenericTestUtils.DelayAnswer.waitForResult()

   
    // Make sure that the checkpoint is still going on, implying that the client
    // RPC to the SBN happened during the checkpoint.
    assertTrue("SBN should have still been checkpointing.",
        answerer.getFireCount() == 1 && answerer.getResultCount() == 0);
    answerer.waitForResult();
    assertTrue("SBN should have finished checkpointing.",
        answerer.getFireCount() == 1 && answerer.getResultCount() == 1);
  }

  private void doEdits(int start, int stop) throws IOException {
View Full Code Here

Examples of org.apache.hadoop.test.GenericTestUtils.DelayAnswer.waitForResult()

      cluster.transitionToActive(1);
     
      // Let the commitBlockSynchronization call go through, and check that
      // it failed with the correct exception.
      delayer.proceed();
      delayer.waitForResult();
      Throwable t = delayer.getThrown();
      if (t == null) {
        fail("commitBlockSynchronization call did not fail on standby");
      }
      GenericTestUtils.assertExceptionContains(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.