Search in sources :

Example 1 with ComposingEmitterConfig

use of io.druid.server.initialization.ComposingEmitterConfig in project druid by druid-io.

the class ComposingEmitterModuleTest method testGetEmitter.

@Test
public void testGetEmitter() {
    ComposingEmitterConfig config = EasyMock.createMock(ComposingEmitterConfig.class);
    EasyMock.expect(config.getEmitters()).andReturn(Lists.newArrayList(testEmitterType)).anyTimes();
    Injector injector = EasyMock.createMock(Injector.class);
    EasyMock.expect(injector.getInstance(Key.get(Emitter.class, Names.named(testEmitterType)))).andReturn(emitter);
    EasyMock.replay(config, injector);
    Emitter composingEmitter = new ComposingEmitterModule().getEmitter(config, injector);
    composingEmitter.start();
    EasyMock.verify(config, emitter, injector);
}
Also used : Emitter(com.metamx.emitter.core.Emitter) Injector(com.google.inject.Injector) ComposingEmitterConfig(io.druid.server.initialization.ComposingEmitterConfig) ComposingEmitterModule(io.druid.server.initialization.ComposingEmitterModule) Test(org.junit.Test)

Aggregations

Injector (com.google.inject.Injector)1 Emitter (com.metamx.emitter.core.Emitter)1 ComposingEmitterConfig (io.druid.server.initialization.ComposingEmitterConfig)1 ComposingEmitterModule (io.druid.server.initialization.ComposingEmitterModule)1 Test (org.junit.Test)1