use of com.yahoo.vespa.config.server.application.ApplicationConvergenceChecker 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);
}
use of com.yahoo.vespa.config.server.application.ApplicationConvergenceChecker in project vespa by vespa-engine.
the class ApplicationHandlerTest method setup.
@Before
public void setup() {
TestTenantBuilder testBuilder = new TestTenantBuilder();
testBuilder.createTenant(mytenantName).withReloadHandler(new MockReloadHandler());
testBuilder.createTenant(foobar).withReloadHandler(new MockReloadHandler());
tenants = testBuilder.createTenants();
provisioner = new SessionHandlerTest.MockProvisioner();
mockHandler = createMockApplicationHandler(provisioner, new ApplicationConvergenceChecker(stateApiFactory), mockHttpProxy, new MockLogServerLogGrabber());
listApplicationsHandler = new ListApplicationsHandler(ListApplicationsHandler.testOnlyContext(), tenants, Zone.defaultZone());
}
Aggregations