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);
}
}
Aggregations