Search in sources :

Example 6 with DruidModule

use of org.apache.druid.initialization.DruidModule in project druid by druid-io.

the class StatusResourceTest method testLoadedModules.

@Test
public void testLoadedModules() {
    Collection<DruidModule> modules = ImmutableList.of(new InitializationTest.TestDruidModule());
    List<StatusResource.ModuleVersion> statusResourceModuleList = new StatusResource.Status(modules).getModules();
    Assert.assertEquals("Status should have all modules loaded!", modules.size(), statusResourceModuleList.size());
    for (DruidModule module : modules) {
        String moduleName = module.getClass().getName();
        boolean contains = Boolean.FALSE;
        for (StatusResource.ModuleVersion version : statusResourceModuleList) {
            if (version.getName().equals(moduleName)) {
                contains = Boolean.TRUE;
                break;
            }
        }
        Assert.assertTrue("Status resource should contain module " + moduleName, contains);
    }
}
Also used : InitializationTest(org.apache.druid.initialization.InitializationTest) DruidModule(org.apache.druid.initialization.DruidModule) Test(org.junit.Test) InitializationTest(org.apache.druid.initialization.InitializationTest)

Aggregations

DruidModule (org.apache.druid.initialization.DruidModule)6 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)5 Injector (com.google.inject.Injector)5 ObjectMapperModule (com.fasterxml.jackson.module.guice.ObjectMapperModule)3 ImmutableList (com.google.common.collect.ImmutableList)2 Test (org.junit.Test)2 AWSCredentialsProvider (com.amazonaws.auth.AWSCredentialsProvider)1 InjectableValues (com.fasterxml.jackson.databind.InjectableValues)1 Module (com.fasterxml.jackson.databind.Module)1 SimpleModule (com.fasterxml.jackson.databind.module.SimpleModule)1 Binder (com.google.inject.Binder)1 Key (com.google.inject.Key)1 Module (com.google.inject.Module)1 Provides (com.google.inject.Provides)1 List (java.util.List)1 ExpressionModule (org.apache.druid.guice.ExpressionModule)1 GuiceInjectors (org.apache.druid.guice.GuiceInjectors)1 Json (org.apache.druid.guice.annotations.Json)1 DropwizardRowIngestionMetersFactory (org.apache.druid.indexing.common.stats.DropwizardRowIngestionMetersFactory)1 TestAppenderatorsManager (org.apache.druid.indexing.common.task.TestAppenderatorsManager)1