Search in sources :

Example 1 with AtlasDbServicesFactory

use of com.palantir.atlasdb.services.AtlasDbServicesFactory in project atlasdb by palantir.

the class TestSweepCommand method setup.

@BeforeClass
public static void setup() throws Exception {
    sweepTimestamp = new AtomicLong();
    moduleFactory = new AtlasDbServicesFactory() {

        @Override
        public TestAtlasDbServices connect(ServicesConfigModule servicesConfigModule) {
            return DaggerTestAtlasDbServices.builder().servicesConfigModule(servicesConfigModule).testSweeperModule(TestSweeperModule.create(sweepTimestamp::get)).build();
        }
    };
}
Also used : AtomicLong(java.util.concurrent.atomic.AtomicLong) AtlasDbServicesFactory(com.palantir.atlasdb.services.AtlasDbServicesFactory) ServicesConfigModule(com.palantir.atlasdb.services.ServicesConfigModule) DaggerTestAtlasDbServices(com.palantir.atlasdb.services.test.DaggerTestAtlasDbServices) TestAtlasDbServices(com.palantir.atlasdb.services.test.TestAtlasDbServices) BeforeClass(org.junit.BeforeClass)

Example 2 with AtlasDbServicesFactory

use of com.palantir.atlasdb.services.AtlasDbServicesFactory in project atlasdb by palantir.

the class TestTimestampCommand method oneTimeSetup.

@BeforeClass
public static void oneTimeSetup() throws Exception {
    lock = StringLockDescriptor.of("lock");
    moduleFactory = new AtlasDbServicesFactory() {

        @Override
        public TestAtlasDbServices connect(ServicesConfigModule servicesConfigModule) {
            return DaggerTestAtlasDbServices.builder().servicesConfigModule(servicesConfigModule).build();
        }
    };
}
Also used : AtlasDbServicesFactory(com.palantir.atlasdb.services.AtlasDbServicesFactory) ServicesConfigModule(com.palantir.atlasdb.services.ServicesConfigModule) DaggerTestAtlasDbServices(com.palantir.atlasdb.services.test.DaggerTestAtlasDbServices) TestAtlasDbServices(com.palantir.atlasdb.services.test.TestAtlasDbServices) BeforeClass(org.junit.BeforeClass)

Aggregations

AtlasDbServicesFactory (com.palantir.atlasdb.services.AtlasDbServicesFactory)2 ServicesConfigModule (com.palantir.atlasdb.services.ServicesConfigModule)2 DaggerTestAtlasDbServices (com.palantir.atlasdb.services.test.DaggerTestAtlasDbServices)2 TestAtlasDbServices (com.palantir.atlasdb.services.test.TestAtlasDbServices)2 BeforeClass (org.junit.BeforeClass)2 AtomicLong (java.util.concurrent.atomic.AtomicLong)1