Search in sources :

Example 1 with ModuleVersion

use of io.druid.server.StatusResource.ModuleVersion in project druid by druid-io.

the class StatusResourceTest method testLoadedModules.

@Test
public void testLoadedModules() {
    Collection<DruidModule> modules = ImmutableList.of((DruidModule) new InitializationTest.TestDruidModule());
    List<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().getCanonicalName();
        boolean contains = Boolean.FALSE;
        for (ModuleVersion version : statusResourceModuleList) {
            if (version.getName().equals(moduleName)) {
                contains = Boolean.TRUE;
            }
        }
        Assert.assertTrue("Status resource should contain module " + moduleName, contains);
    }
}
Also used : ModuleVersion(io.druid.server.StatusResource.ModuleVersion) DruidModule(io.druid.initialization.DruidModule) Test(org.junit.Test) InitializationTest(io.druid.initialization.InitializationTest)

Aggregations

DruidModule (io.druid.initialization.DruidModule)1 InitializationTest (io.druid.initialization.InitializationTest)1 ModuleVersion (io.druid.server.StatusResource.ModuleVersion)1 Test (org.junit.Test)1