@Ignore("ignoring for the moment to let the other tests run on CI")
@Test
public void testLoadCoreInetOrgPersonAndNis() throws Exception
{
LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
SchemaManager schemaManager = new DefaultSchemaManager( loader );
assertTrue( schemaManager.load( "system" ) );
// Try to load a disabled schema when the registries does
// ot allow disabled schema to be loaded
assertFalse( schemaManager.load( "core", "nis", "cosine", "InetOrgPerson" ) );
assertFalse( schemaManager.getErrors().isEmpty() );
assertEquals( 38, schemaManager.getAttributeTypeRegistry().size() );
assertEquals( 35, schemaManager.getComparatorRegistry().size() );
assertEquals( 35, schemaManager.getMatchingRuleRegistry().size() );
assertEquals( 35, schemaManager.getNormalizerRegistry().size() );
assertEquals( 9, schemaManager.getObjectClassRegistry().size() );
assertEquals( 59, schemaManager.getSyntaxCheckerRegistry().size() );
assertEquals( 59, schemaManager.getLdapSyntaxRegistry().size() );
assertEquals( 141, schemaManager.getGlobalOidRegistry().size() );
assertEquals( 1, schemaManager.getRegistries().getLoadedSchemas().size() );
assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
assertNull( schemaManager.getRegistries().getLoadedSchema( "nis" ) );
assertNull( schemaManager.getRegistries().getLoadedSchema( "core" ) );
assertNull( schemaManager.getRegistries().getLoadedSchema( "cosine" ) );
assertNull( schemaManager.getRegistries().getLoadedSchema( "InetOrgPerson" ) );
}