Package com.opengamma.engine.view.worker.SingleThreadViewProcessWorker

Examples of com.opengamma.engine.view.worker.SingleThreadViewProcessWorker.BorrowedThread.join()


    // We're now 'between cycles', waiting for the arrival of live data.
    // Interrupting should terminate the job gracefully
    worker.getJob().terminate();
    recalcThread.interrupt();

    recalcThread.join(TIMEOUT);
    assertEquals(Thread.State.TERMINATED, recalcThread.getState());
  }

  @Test
  public void testWaitForMarketData() throws InterruptedException {
View Full Code Here


    final BorrowedThread recalcThread = ((SingleThreadViewProcessWorker) env.getCurrentWorker(viewProcess)).getThread();
    assertThreadReachesState(recalcThread, Thread.State.TIMED_WAITING);

    underlyingProvider.addValue(ViewProcessorTestEnvironment.getPrimitive1(), 123d);
    underlyingProvider.addValue(ViewProcessorTestEnvironment.getPrimitive2(), 456d);
    recalcThread.join();
    resultListener.assertCycleCompleted(TIMEOUT);

    final Map<String, Object> resultValues = new HashMap<String, Object>();
    final ViewComputationResultModel result = client.getLatestResult();
    final ViewTargetResultModel targetResult = result.getTargetResult(ViewProcessorTestEnvironment.getPrimitiveTarget());
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.