use of com.yahoo.config.SimpletypesConfig in project vespa by vespa-engine.
the class TenantRequestHandlerTest method testResolveMultipleApps.
@Test
public void testResolveMultipleApps() throws IOException, SAXException {
ApplicationId appId1 = new ApplicationId.Builder().tenant(tenant).applicationName("myapp1").instanceName("myinst1").build();
ApplicationId appId2 = new ApplicationId.Builder().tenant(tenant).applicationName("myapp2").instanceName("myinst2").build();
feedAndReloadApp(app1, 1, appId1);
SimpletypesConfig config = resolve(SimpletypesConfig.class, server, appId1, vespaVersion, "");
assertThat(config.intval(), is(1337));
feedAndReloadApp(app2, 2, appId2);
config = resolve(SimpletypesConfig.class, server, appId2, vespaVersion, "");
assertThat(config.intval(), is(1330));
}
use of com.yahoo.config.SimpletypesConfig in project vespa by vespa-engine.
the class TenantRequestHandlerTest method testResolveForAppId.
@Test
public void testResolveForAppId() {
long id = 1l;
SessionZooKeeperClient zkc = new SessionZooKeeperClient(curator, configCurator, Tenants.getSessionsPath(tenant).append(String.valueOf(id)), new TestConfigDefinitionRepo(), "", Optional.empty());
ApplicationId appId = new ApplicationId.Builder().tenant(tenant).applicationName("myapp").instanceName("myinst").build();
zkc.writeApplicationId(appId);
RemoteSession session = new RemoteSession(appId.tenant(), id, componentRegistry, zkc, Clock.systemUTC());
server.reloadConfig(session.ensureApplicationLoaded());
SimpletypesConfig config = resolve(SimpletypesConfig.class, server, appId, vespaVersion, "");
assertThat(config.intval(), is(1337));
}
Aggregations