use of com.yahoo.vespa.config.server.session.RemoteSession in project vespa by vespa-engine.
the class TenantRequestHandlerTest method feedAndReloadApp.
private void feedAndReloadApp(File appDir, long sessionId, ApplicationId appId) throws IOException {
feedApp(appDir, sessionId, appId);
SessionZooKeeperClient zkc = new SessionZooKeeperClient(curator, Tenants.getSessionsPath(tenant).append(String.valueOf(sessionId)));
zkc.writeApplicationId(appId);
RemoteSession session = new RemoteSession(tenant, sessionId, componentRegistry, zkc, Clock.systemUTC());
server.reloadConfig(session.ensureApplicationLoaded());
}
use of com.yahoo.vespa.config.server.session.RemoteSession 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