Package org.apache.hadoop.test.MultithreadedTestUtil

Examples of org.apache.hadoop.test.MultithreadedTestUtil.TestingThread


  public void testNoErrors() throws Exception {
    final AtomicInteger threadsRun = new AtomicInteger();

    TestContext ctx = new TestContext();
    for (int i = 0; i < 3; i++) {
      ctx.addThread(new TestingThread(ctx) {
        @Override
        public void doWork() throws Exception {
          threadsRun.incrementAndGet();
        }
      });
View Full Code Here


  }

  @Test
  public void testThreadFails() throws Exception {
    TestContext ctx = new TestContext();
    ctx.addThread(new TestingThread(ctx) {
      @Override
      public void doWork() throws Exception {
        fail(FAIL_MSG);
      }
    });
View Full Code Here

  }

  @Test
  public void testThreadThrowsCheckedException() throws Exception {
    TestContext ctx = new TestContext();
    ctx.addThread(new TestingThread(ctx) {
      @Override
      public void doWork() throws Exception {
        throw new IOException("my ioe");
      }
    });
View Full Code Here

TOP

Related Classes of org.apache.hadoop.test.MultithreadedTestUtil.TestingThread

Copyright © 2018 www.massapicom. 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.