Search in sources :

Example 1 with MetricsConfig

use of com.torodb.core.metrics.MetricsConfig in project torodb by torodb.

the class OplogTestContextResourceRule method before.

@Override
protected void before() throws Throwable {
    testInjector = Guice.createInjector(new ReplTestModule(), new TorodServerTestModule(), new CoreModule(), new BackendModule(), new DerbyBackendModule(), new MetainfModule(), new D2RModule(), new MemoryTorodModule(), new MetricsModule(new MetricsConfig() {

        @Override
        public Boolean getMetricsEnabled() {
            return true;
        }
    }), new ConcurrentModule(), new MongoLayerModule(), new MongodServerTestModule(), specificModuleSupplier.get());
    torodServer = testInjector.getInstance(TorodBundle.class).getTorodServer();
    torodServer.startAsync();
    mongodServer = testInjector.getInstance(MongodServer.class);
    mongodServer.startAsync();
    mongodServer.awaitRunning();
    assert mongodServer.getTorodServer().equals(torodServer);
    torodServer.awaitRunning();
    oplogManager = testInjector.getInstance(OplogManager.class);
    oplogManager.startAsync();
    oplogManager.awaitRunning();
    aobe = testInjector.getInstance(AnalyzedOplogBatchExecutor.class);
    aobe.startAsync();
    aobe.awaitRunning();
    oplogApplier = testInjector.getInstance(OplogApplier.class);
    testContext = new DefaultOplogTestContext(mongodServer, oplogApplier);
}
Also used : AnalyzedOplogBatchExecutor(com.torodb.mongodb.repl.oplogreplier.batch.AnalyzedOplogBatchExecutor) MongoLayerModule(com.torodb.mongodb.guice.MongoLayerModule) D2RModule(com.torodb.d2r.guice.D2RModule) OplogManager(com.torodb.mongodb.repl.OplogManager) ConcurrentModule(com.torodb.concurrent.guice.ConcurrentModule) MetricsConfig(com.torodb.core.metrics.MetricsConfig) MetricsModule(com.torodb.core.metrics.guice.MetricsModule) CoreModule(com.torodb.core.guice.CoreModule) BackendModule(com.torodb.backend.guice.BackendModule) DerbyBackendModule(com.torodb.backend.derby.guice.DerbyBackendModule) MetainfModule(com.torodb.metainfo.guice.MetainfModule) MongodServer(com.torodb.mongodb.core.MongodServer) MemoryTorodModule(com.torodb.torod.guice.MemoryTorodModule) DerbyBackendModule(com.torodb.backend.derby.guice.DerbyBackendModule)

Aggregations

DerbyBackendModule (com.torodb.backend.derby.guice.DerbyBackendModule)1 BackendModule (com.torodb.backend.guice.BackendModule)1 ConcurrentModule (com.torodb.concurrent.guice.ConcurrentModule)1 CoreModule (com.torodb.core.guice.CoreModule)1 MetricsConfig (com.torodb.core.metrics.MetricsConfig)1 MetricsModule (com.torodb.core.metrics.guice.MetricsModule)1 D2RModule (com.torodb.d2r.guice.D2RModule)1 MetainfModule (com.torodb.metainfo.guice.MetainfModule)1 MongodServer (com.torodb.mongodb.core.MongodServer)1 MongoLayerModule (com.torodb.mongodb.guice.MongoLayerModule)1 OplogManager (com.torodb.mongodb.repl.OplogManager)1 AnalyzedOplogBatchExecutor (com.torodb.mongodb.repl.oplogreplier.batch.AnalyzedOplogBatchExecutor)1 MemoryTorodModule (com.torodb.torod.guice.MemoryTorodModule)1