Search in sources :

Example 1 with RemoteSessionRepo

use of com.yahoo.vespa.config.server.session.RemoteSessionRepo in project vespa by vespa-engine.

the class TestTenantBuilder method createTenant.

public TenantBuilder createTenant(TenantName tenantName) {
    MemoryTenantApplications applicationRepo = new MemoryTenantApplications();
    TenantBuilder builder = TenantBuilder.create(componentRegistry, tenantName).withSessionFactory(new SessionCreateHandlerTest.MockSessionFactory()).withLocalSessionRepo(new LocalSessionRepo(componentRegistry.getClock())).withRemoteSessionRepo(new RemoteSessionRepo(tenantName)).withApplicationRepo(applicationRepo);
    tenantMap.put(tenantName, builder);
    return builder;
}
Also used : RemoteSessionRepo(com.yahoo.vespa.config.server.session.RemoteSessionRepo) MemoryTenantApplications(com.yahoo.vespa.config.server.application.MemoryTenantApplications) LocalSessionRepo(com.yahoo.vespa.config.server.session.LocalSessionRepo) TenantBuilder(com.yahoo.vespa.config.server.tenant.TenantBuilder)

Example 2 with RemoteSessionRepo

use of com.yahoo.vespa.config.server.session.RemoteSessionRepo in project vespa by vespa-engine.

the class SessionActiveHandlerTest method setup.

@Before
public void setup() throws Exception {
    remoteSessionRepo = new RemoteSessionRepo(tenant);
    applicationRepo = new MemoryTenantApplications();
    curator = new MockCurator();
    configCurator = ConfigCurator.create(curator);
    localRepo = new LocalSessionRepo(Clock.systemUTC());
    pathPrefix = "/application/v2/tenant/" + tenant + "/session/";
    hostProvisioner = new MockProvisioner();
    modelFactory = new VespaModelFactory(new NullConfigModelRegistry());
    componentRegistry = new TestComponentRegistry.Builder().curator(curator).configCurator(configCurator).modelFactoryRegistry(new ModelFactoryRegistry(Collections.singletonList(modelFactory))).build();
}
Also used : VespaModelFactory(com.yahoo.vespa.model.VespaModelFactory) RemoteSessionRepo(com.yahoo.vespa.config.server.session.RemoteSessionRepo) NullConfigModelRegistry(com.yahoo.config.model.NullConfigModelRegistry) MemoryTenantApplications(com.yahoo.vespa.config.server.application.MemoryTenantApplications) LocalSessionRepo(com.yahoo.vespa.config.server.session.LocalSessionRepo) TestComponentRegistry(com.yahoo.vespa.config.server.TestComponentRegistry) ModelFactoryRegistry(com.yahoo.vespa.config.server.modelfactory.ModelFactoryRegistry) MockCurator(com.yahoo.vespa.curator.mock.MockCurator) Before(org.junit.Before)

Aggregations

MemoryTenantApplications (com.yahoo.vespa.config.server.application.MemoryTenantApplications)2 LocalSessionRepo (com.yahoo.vespa.config.server.session.LocalSessionRepo)2 RemoteSessionRepo (com.yahoo.vespa.config.server.session.RemoteSessionRepo)2 NullConfigModelRegistry (com.yahoo.config.model.NullConfigModelRegistry)1 TestComponentRegistry (com.yahoo.vespa.config.server.TestComponentRegistry)1 ModelFactoryRegistry (com.yahoo.vespa.config.server.modelfactory.ModelFactoryRegistry)1 TenantBuilder (com.yahoo.vespa.config.server.tenant.TenantBuilder)1 MockCurator (com.yahoo.vespa.curator.mock.MockCurator)1 VespaModelFactory (com.yahoo.vespa.model.VespaModelFactory)1 Before (org.junit.Before)1