Search in sources :

Example 1 with LogServerLogGrabber

use of com.yahoo.vespa.config.server.application.LogServerLogGrabber in project vespa by vespa-engine.

the class ApplicationHandlerTest method testFailingProvisioner.

@Test
@Ignore
public void testFailingProvisioner() throws Exception {
    provisioner = new SessionHandlerTest.FailingMockProvisioner();
    mockHandler = createMockApplicationHandler(provisioner, new ApplicationConvergenceChecker(stateApiFactory), new HttpProxy(new SimpleHttpFetcher()), new LogServerLogGrabber());
    final ApplicationId applicationId = ApplicationId.defaultId();
    addMockApplication(tenants.getTenant(mytenantName), applicationId, 1, Clock.systemUTC());
    assertApplicationExists(mytenantName, applicationId, Zone.defaultZone());
    provisioner.activated = true;
    String url = "http://myhost:14000/application/v2/tenant/" + mytenantName + "/application/" + applicationId.application();
    deleteAndAssertResponse(mockHandler, url, 500, null, "{\"message\":\"Cannot remove application\"}", com.yahoo.jdisc.http.HttpRequest.Method.DELETE);
    assertApplicationExists(mytenantName, applicationId, Zone.defaultZone());
    Assert.assertTrue(provisioner.activated);
}
Also used : HttpProxy(com.yahoo.vespa.config.server.application.HttpProxy) ApplicationConvergenceChecker(com.yahoo.vespa.config.server.application.ApplicationConvergenceChecker) SessionHandlerTest(com.yahoo.vespa.config.server.http.SessionHandlerTest) SimpleHttpFetcher(com.yahoo.vespa.config.server.http.SimpleHttpFetcher) ApplicationId(com.yahoo.config.provision.ApplicationId) LogServerLogGrabber(com.yahoo.vespa.config.server.application.LogServerLogGrabber) Ignore(org.junit.Ignore) HandlerTest(com.yahoo.vespa.config.server.http.HandlerTest) SessionHandlerTest(com.yahoo.vespa.config.server.http.SessionHandlerTest) Test(org.junit.Test)

Aggregations

ApplicationId (com.yahoo.config.provision.ApplicationId)1 ApplicationConvergenceChecker (com.yahoo.vespa.config.server.application.ApplicationConvergenceChecker)1 HttpProxy (com.yahoo.vespa.config.server.application.HttpProxy)1 LogServerLogGrabber (com.yahoo.vespa.config.server.application.LogServerLogGrabber)1 HandlerTest (com.yahoo.vespa.config.server.http.HandlerTest)1 SessionHandlerTest (com.yahoo.vespa.config.server.http.SessionHandlerTest)1 SimpleHttpFetcher (com.yahoo.vespa.config.server.http.SimpleHttpFetcher)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1