Package org.apache.hadoop.http

Examples of org.apache.hadoop.http.HttpServer.stop()


    Assert.assertEquals(1, JobEndServlet.calledTimes);
    Assert.assertEquals("jobid=" + job.getID() + "&status=SUCCEEDED",
        JobEndServlet.requestUri.getQuery());
    Assert.assertEquals(JobState.SUCCEEDED.toString(),
      JobEndServlet.foundJobState);
    server.stop();
  }

  @Test
  public void testAbsentNotificationOnNotLastRetryUnregistrationFailure()
      throws Exception {
View Full Code Here


    app.waitForState(job, JobState.RUNNING);
    Assert.assertEquals(false, app.isLastAMRetry());
    Assert.assertEquals(0, JobEndServlet.calledTimes);
    Assert.assertEquals(null, JobEndServlet.requestUri);
    Assert.assertEquals(null, JobEndServlet.foundJobState);
    server.stop();
  }

  @Test
  public void testNotificationOnLastRetryUnregistrationFailure()
      throws Exception {
View Full Code Here

    Assert.assertEquals(1, JobEndServlet.calledTimes);
    Assert.assertEquals("jobid=" + job.getID() + "&status=FAILED",
        JobEndServlet.requestUri.getQuery());
    Assert.assertEquals(JobState.FAILED.toString(),
      JobEndServlet.foundJobState);
    server.stop();
  }

  private static HttpServer startHttpServer() throws Exception {
    new File(System.getProperty(
        "build.webapps", "build/webapps") + "/test").mkdirs();
View Full Code Here

      // Check that length header was picked up.
      assertEquals(FAKE_LOG_DATA.length, elis.length());
      elis.close();
    } finally {
      server.stop();
    }
  }

  @SuppressWarnings("serial")
  public static class FakeLogServlet extends HttpServlet {
View Full Code Here

    server.start();
    try {
      List<Long> threads = monitor.waitForJettyThreads();
      assertEquals(1, threads.size());
    } finally {
      server.stop();
    }
  }
 
  /**
   * Test that the CPU monitoring can detect a spinning
View Full Code Here

    
      // Check that length header was picked up.
      assertEquals(FAKE_LOG_DATA.length, elis.length());
      elis.close();
    } finally {
      server.stop();
    }
  }

  @SuppressWarnings("serial")
  public static class FakeLogServlet extends HttpServlet {
View Full Code Here

      } catch (SocketTimeoutException e) {
        assertEquals("Read should timeout", "Read timed out", e.getMessage());
      }
    } finally {
      if (testServer != null) {
        testServer.stop();
      }
    }
  }

  public static class TestGetImageServlet extends HttpServlet {
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.