directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r894830 - in /directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core: jndi/ jndi/referral/ operations/bind/ operations/compare/ operations/lookup/ operations/modify/ operations/search/ partitio...
Date Thu, 31 Dec 2009 12:21:50 GMT
Author: kayyagari
Date: Thu Dec 31 12:21:49 2009
New Revision: 894830

URL: http://svn.apache.org/viewvc?rev=894830&view=rev
Log:
o migrated remaining test cases to use the new testing framework
o fixed the failing SubSchemaSubentryIT by creating a calss level DirectoryService instance

Modified:
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ModifyContextIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/CompareReferralIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/DeleteReferralIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveAndRenameReferralIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveReferralIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/SearchReferralIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/compare/CompareDirserver1139IT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyAddIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyDelIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyMultipleChangesIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/partition/PartitionIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java Thu Dec 31 12:21:49 2009
@@ -27,11 +27,6 @@
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import java.io.File;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
 import javax.naming.NamingEnumeration;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
@@ -42,32 +37,14 @@
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.constants.ServerDNConstants;
-import org.apache.directory.server.core.DefaultDirectoryService;
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.DirectoryServiceFactory;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.core.integ.annotations.Factory;
-import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
-import org.apache.directory.server.core.partition.ldif.LdifPartition;
-import org.apache.directory.server.core.schema.SchemaPartition;
-import org.apache.directory.server.xdbm.Index;
-import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.server.core.annotations.ContextEntry;
+import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.annotations.CreateIndex;
+import org.apache.directory.server.core.annotations.CreatePartition;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
-import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.DefaultSchemaLdifExtractor;
-import org.apache.directory.shared.ldap.schema.loader.ldif.JarLdifSchemaLoader;
-import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
-import org.apache.directory.shared.ldap.util.ExceptionUtils;
-import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -78,117 +55,32 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith(CiRunner.class)
-@CleanupLevel(Level.CLASS)
-@Factory(MixedCaseITest.MyFactory.class)
-public class MixedCaseITest
+@RunWith(FrameworkRunner.class)
+@CreateDS(name = "MixedCaseITest-class",
+    partitions =
+        {
+            @CreatePartition(
+                name = "apache",
+                suffix = "dc=Apache,dc=Org",
+                contextEntry = @ContextEntry( 
+                    entryLdif =
+                        "dn: dc=Apache,dc=Org\n" +
+                        "dc: Apache\n" +
+                        "objectClass: top\n" +
+                        "objectClass: domain\n\n" ),
+                indexes = 
+                {
+                    @CreateIndex( attribute = "objectClass" ),
+                    @CreateIndex( attribute = "ou" ),
+                    @CreateIndex( attribute = "uid" )
+                } )
+        } )
+public class MixedCaseITest extends AbstractLdapTestUnit
 {
-    public static DirectoryService service;
 
     private static final String SUFFIX_DN = "dc=Apache,dc=Org";
 
-    public static class MyFactory implements DirectoryServiceFactory
-    {
-        public DirectoryService newInstance() throws Exception
-        {
-            String workingDirectory = System.getProperty( "workingDirectory" );
-
-            if ( workingDirectory == null )
-            {
-                String path = DirectoryServiceFactory.class.getResource( "" ).getPath();
-                int targetPos = path.indexOf( "target" );
-                workingDirectory = path.substring( 0, targetPos + 6 ) + "/server-work";
-            }
-
-            service = new DefaultDirectoryService();
-            service.setWorkingDirectory( new File( workingDirectory ) );
-
-            return service;
-        }
-
-
-        public void init() throws Exception
-        {
-            SchemaPartition schemaPartition = service.getSchemaService().getSchemaPartition();
-
-            // Init the LdifPartition
-            LdifPartition ldifPartition = new LdifPartition();
-
-            String workingDirectory = service.getWorkingDirectory().getPath();
-
-            ldifPartition.setWorkingDirectory( workingDirectory + "/schema" );
-
-            // Extract the schema on disk (a brand new one) and load the registries
-            SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory ) );
-
-            schemaPartition.setWrappedPartition( ldifPartition );
-
-            JarLdifSchemaLoader loader = new JarLdifSchemaLoader();
-
-            SchemaManager schemaManager = new DefaultSchemaManager( loader );
-            service.setSchemaManager( schemaManager );
-
-            schemaManager.loadAllEnabled();
-
-            List<Throwable> errors = schemaManager.getErrors();
-
-            if ( errors.size() != 0 )
-            {
-                fail( "Schema load failed : " + ExceptionUtils.printErrors( errors ) );
-            }
-
-            schemaPartition.setSchemaManager( schemaManager );
-
-            extractor.extractOrCopy();
-
-            service.getChangeLog().setEnabled( true );
-
-            // change the working directory to something that is unique
-            // on the system and somewhere either under target directory
-            // or somewhere in a temp area of the machine.
-
-            // Inject the System Partition
-            Partition systemPartition = new JdbmPartition();
-            systemPartition.setId( "system" );
-            ( ( JdbmPartition ) systemPartition ).setCacheSize( 500 );
-            systemPartition.setSuffix( ServerDNConstants.SYSTEM_DN );
-            systemPartition.setSchemaManager( schemaManager );
-            ( ( JdbmPartition ) systemPartition ).setPartitionDir( new File( workingDirectory, "system" ) );
-
-            // Add objectClass attribute for the system partition
-            Set<Index<?, ServerEntry>> indexedAttrs = new HashSet<Index<?, ServerEntry>>();
-            indexedAttrs.add( new JdbmIndex<Object, ServerEntry>( SchemaConstants.OBJECT_CLASS_AT ) );
-            ( ( JdbmPartition ) systemPartition ).setIndexedAttributes( indexedAttrs );
-
-            service.setSystemPartition( systemPartition );
-
-            JdbmPartition partition = new JdbmPartition();
-            partition.setId( "apache" );
-            partition.setSuffix( SUFFIX_DN );
-            partition.setPartitionDir( new File( workingDirectory, "apache" ) );
-
-            HashSet<Index<?, ServerEntry>> indexedAttributes = new HashSet<Index<?, ServerEntry>>();
-            indexedAttributes.add( new JdbmIndex<String, ServerEntry>( "objectClass" ) );
-            indexedAttributes.add( new JdbmIndex<String, ServerEntry>( "ou" ) );
-            indexedAttributes.add( new JdbmIndex<String, ServerEntry>( "uid" ) );
-            partition.setIndexedAttributes( indexedAttributes );
-
-            service.addPartition( partition );
-        }
-    }
-
-
-    @Before
-    public void setUp() throws Exception
-    {
-        LdapDN dn = new LdapDN( "dc=Apache,dc=Org" );
-        ServerEntry entry = service.newEntry( dn );
-        entry.add( "objectClass", "top", "domain", "extensibleObject" );
-        entry.add( "dc", "Apache" );
-        service.getAdminSession().add( entry );
-    }
-
-
+    
     @Test
     public void testSearch() throws Exception
     {

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ModifyContextIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ModifyContextIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ModifyContextIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ModifyContextIT.java Thu Dec 31 12:21:49 2009
@@ -36,15 +36,11 @@
 import javax.naming.directory.DirContext;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.annotations.CreateDS;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.factory.DefaultDirectoryServiceFactory;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
-import org.apache.directory.server.core.integ.CiRunner;
 import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java Thu Dec 31 12:21:49 2009
@@ -50,10 +50,10 @@
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.integ.CiRunner;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.exception.LdapReferralException;
@@ -70,10 +70,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( CiRunner.class )
-public class ReferralIT
+@RunWith ( FrameworkRunner.class )
+public class ReferralIT extends AbstractLdapTestUnit
 {
-    public static DirectoryService service;
     private TestData td = new TestData();
 
 

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java Thu Dec 31 12:21:49 2009
@@ -41,10 +41,11 @@
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.junit.Before;
 import org.junit.Test;
@@ -61,7 +62,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 691179 $
  */
-@RunWith ( CiRunner.class )
+@RunWith ( FrameworkRunner.class )
 @ApplyLdifs( {
     // Root
     "dn: c=WW,ou=system",
@@ -100,10 +101,8 @@
     "sn: akarasulu"
     }
 )
-public class AddReferralIT
+public class AddReferralIT extends AbstractLdapTestUnit
 {
-    /** The directory service */
-    public static DirectoryService service;
 
     /** The Context we are using to inject entries with JNDI */
     LdapContext MNNCtx;

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/CompareReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/CompareReferralIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/CompareReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/CompareReferralIT.java Thu Dec 31 12:21:49 2009
@@ -42,11 +42,11 @@
 
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.junit.Before;
 import org.junit.Test;
@@ -63,7 +63,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 691179 $
  */
-@RunWith ( CiRunner.class )
+@RunWith ( FrameworkRunner.class )
 @ApplyLdifs( {
     // Root
     "dn: c=WW,ou=system",
@@ -102,10 +102,8 @@
     "sn: akarasulu"
     }
 )
-public class CompareReferralIT
+public class CompareReferralIT extends AbstractLdapTestUnit
 {
-    /** The directory service */
-    public static DirectoryService service;
 
     /** The Context we are using to inject entries with JNDI */
     LdapContext MNNCtx;

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/DeleteReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/DeleteReferralIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/DeleteReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/DeleteReferralIT.java Thu Dec 31 12:21:49 2009
@@ -37,10 +37,11 @@
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.junit.Before;
 import org.junit.Test;
@@ -57,7 +58,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 691179 $
  */
-@RunWith ( CiRunner.class )
+@RunWith ( FrameworkRunner.class )
 @ApplyLdifs( {
     // Root
     "dn: c=WW,ou=system",
@@ -96,10 +97,8 @@
     "sn: akarasulu"
     }
 )
-public class DeleteReferralIT
+public class DeleteReferralIT extends AbstractLdapTestUnit
 {
-    /** The directory service */
-    public static DirectoryService service;
 
     /** The Context we are using to inject entries with JNDI */
     LdapContext MNNCtx;

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java Thu Dec 31 12:21:49 2009
@@ -44,10 +44,11 @@
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.entry.client.ClientAttribute;
@@ -69,7 +70,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 691179 $
  */
-@RunWith ( CiRunner.class )
+@RunWith ( FrameworkRunner.class )
 @ApplyLdifs( {
     // Root
     "dn: c=WW,ou=system",
@@ -108,10 +109,8 @@
     "sn: akarasulu"
     }
 )
-public class ModifyReferralIT
+public class ModifyReferralIT extends AbstractLdapTestUnit
 {
-    /** The directory service */
-    public static DirectoryService service;
 
     /** The Context we are using to inject entries with JNDI */
     LdapContext MNNCtx;

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveAndRenameReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveAndRenameReferralIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveAndRenameReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveAndRenameReferralIT.java Thu Dec 31 12:21:49 2009
@@ -41,10 +41,11 @@
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -64,7 +65,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 691179 $
  */
-@RunWith ( CiRunner.class )
+@RunWith ( FrameworkRunner.class )
 @ApplyLdifs( {
     // Root
     "dn: c=WW,ou=system",
@@ -123,10 +124,8 @@
     "sn: elecharny"
     }
 )
-public class MoveAndRenameReferralIT
+public class MoveAndRenameReferralIT extends AbstractLdapTestUnit
 {
-    /** The directory service */
-    public static DirectoryService service;
 
     /** The Context we are using to inject entries with JNDI */
     LdapContext MNNCtx;

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveReferralIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveReferralIT.java Thu Dec 31 12:21:49 2009
@@ -40,10 +40,11 @@
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -62,7 +63,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 691179 $
  */
-@RunWith ( CiRunner.class )
+@RunWith ( FrameworkRunner.class )
 @ApplyLdifs( {
     // Root
     "dn: c=WW,ou=system",
@@ -114,10 +115,8 @@
     "sn: akarasulu"
     }
 )
-public class MoveReferralIT
+public class MoveReferralIT extends AbstractLdapTestUnit
 {
-    /** The directory service */
-    public static DirectoryService service;
 
     /** The Contexts we are using to inject entries with JNDI */
     LdapContext MNNCtx;

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIT.java Thu Dec 31 12:21:49 2009
@@ -39,11 +39,11 @@
 
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.junit.Before;
@@ -63,7 +63,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 691179 $
  */
-@RunWith ( CiRunner.class )
+@RunWith ( FrameworkRunner.class )
 @ApplyLdifs( {
     // Root
     "dn: c=WW,ou=system",
@@ -115,10 +115,8 @@
     "sn: akarasulu"
     }
 )
-public class RenameReferralIT
+public class RenameReferralIT extends AbstractLdapTestUnit
 {
-    /** The directory service */
-    public static DirectoryService service;
 
     /** The Context we are using to inject entries with JNDI */
     LdapContext MNNCtx;

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/SearchReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/SearchReferralIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/SearchReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/SearchReferralIT.java Thu Dec 31 12:21:49 2009
@@ -41,12 +41,12 @@
 
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.junit.Before;
@@ -64,7 +64,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 691179 $
  */
-@RunWith ( CiRunner.class )
+@RunWith ( FrameworkRunner.class )
 @ApplyLdifs( {
     // Root
     "dn: c=WW,ou=system",
@@ -116,10 +116,8 @@
     "sn: akarasulu"
     }
 )
-public class SearchReferralIT
+public class SearchReferralIT extends AbstractLdapTestUnit
 {
-    /** The directory service */
-    public static DirectoryService service;
 
     /** The Context we are using to inject entries with JNDI */
     LdapContext MNNCtx;

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java Thu Dec 31 12:21:49 2009
@@ -20,6 +20,12 @@
 package org.apache.directory.server.core.operations.bind;
 
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.util.Hashtable;
 
 import javax.naming.Context;
@@ -33,7 +39,8 @@
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
 import org.apache.directory.shared.ldap.constants.JndiPropertyConstants;
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationException;
@@ -41,11 +48,6 @@
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 
 
 /**
@@ -54,12 +56,10 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( CiRunner.class )
-public class SimpleBindIT
+@RunWith ( FrameworkRunner.class )
+public class SimpleBindIT extends AbstractLdapTestUnit
 {
-    /** The directory service */
-    public static DirectoryService service;
-    
+
     /**
      * A method to do a search
      */

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/compare/CompareDirserver1139IT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/compare/CompareDirserver1139IT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/compare/CompareDirserver1139IT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/compare/CompareDirserver1139IT.java Thu Dec 31 12:21:49 2009
@@ -35,10 +35,8 @@
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Before;
@@ -52,11 +50,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( CiRunner.class )
-@CleanupLevel ( Level.CLASS )
-public class CompareDirserver1139IT
+@RunWith ( FrameworkRunner.class )
+public class CompareDirserver1139IT extends AbstractLdapTestUnit
 {
-    public static DirectoryService service;
     
     /**
      * Activate the NIS and KRB5KDC schemas

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupIT.java Thu Dec 31 12:21:49 2009
@@ -23,12 +23,10 @@
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.junit.Test;
@@ -41,8 +39,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( CiRunner.class )
-@CleanupLevel ( Level.CLASS )
+@RunWith ( FrameworkRunner.class )
 @ApplyLdifs( {
     // Entry # 1
     "dn: cn=test,ou=system",
@@ -50,11 +47,8 @@
     "cn: test",
     "sn: sn_test" 
 })
-public class LookupIT
+public class LookupIT extends AbstractLdapTestUnit
 {
-    /** The directory service */
-    public static DirectoryService service;
-
 
     /**
      * Test a lookup( DN, "*") operation

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyAddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyAddIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyAddIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyAddIT.java Thu Dec 31 12:21:49 2009
@@ -37,9 +37,9 @@
 import javax.naming.directory.NoSuchAttributeException;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.exception.LdapAttributeInUseException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
@@ -55,7 +55,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 770988 $
  */
-@RunWith ( CiRunner.class )
+@RunWith ( FrameworkRunner.class )
 @ApplyLdifs(
     {
         "dn: m-oid=2.2.0, ou=attributeTypes, cn=apachemeta, ou=schema",
@@ -136,13 +136,11 @@
         "manager: cn=Heather Nova, ou=system"
     }
 )
-public class ModifyAddIT
+public class ModifyAddIT extends AbstractLdapTestUnit
 {
     private static final String PERSON_DESCRIPTION = "an American singer-songwriter";
     private static final String RDN_HEATHER_NOVA = "cn=Heather Nova";
 
-    public static DirectoryService service;
-
     
     /**
      * @param sysRoot the system root to add entries to

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyDelIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyDelIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyDelIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyDelIT.java Thu Dec 31 12:21:49 2009
@@ -23,10 +23,10 @@
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
 
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
@@ -38,8 +38,9 @@
 import javax.naming.ldap.LdapContext;
 
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
@@ -53,7 +54,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 770988 $
  */
-@RunWith ( CiRunner.class )
+@RunWith ( FrameworkRunner.class )
 @ApplyLdifs(
     {
         "dn: m-oid=2.2.0, ou=attributeTypes, cn=apachemeta, ou=schema",
@@ -144,13 +145,11 @@
         "manager: cn=Heather Nova, ou=system"
     }
 )
-public class ModifyDelIT
+public class ModifyDelIT extends AbstractLdapTestUnit
 {
     private static final String RDN_HEATHER_NOVA = "cn=Heather Nova";
     private static final String RDN_KIM_WILDE = "cn=kim wilde";
 
-    public static DirectoryService service;
-
     
     /**
      * @param sysRoot the system root to add entries to

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyMultipleChangesIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyMultipleChangesIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyMultipleChangesIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyMultipleChangesIT.java Thu Dec 31 12:21:49 2009
@@ -20,6 +20,12 @@
 package org.apache.directory.server.core.operations.modify;
 
 
+import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
+import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
@@ -30,19 +36,13 @@
 import javax.naming.ldap.LdapContext;
 
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
-import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
 
 /**
  * Test case with multiple modifications on a person entry.
@@ -50,7 +50,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( CiRunner.class ) 
+@RunWith ( FrameworkRunner.class ) 
 @ApplyLdifs( {
     // Entry # 1
     "dn: cn=Tori Amos,ou=system",
@@ -71,12 +71,10 @@
     "sn: Harry" 
     }
 )
-public class ModifyMultipleChangesIT 
+public class ModifyMultipleChangesIT extends AbstractLdapTestUnit 
 {
     private static final String RDN_TORI_AMOS = "cn=Tori Amos";
 
-    public static DirectoryService service;
-    
 
     /**
      * @param sysRoot the system root to add entries to

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java Thu Dec 31 12:21:49 2009
@@ -40,11 +40,9 @@
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
@@ -60,13 +58,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( CiRunner.class )
-@CleanupLevel ( Level.CLASS )
-public class SearchWithIndicesITest
+@RunWith ( FrameworkRunner.class )
+public class SearchWithIndicesITest extends AbstractLdapTestUnit
 {
-    public static DirectoryService service;
-
-
 
     @Before
     public void createData() throws Exception

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/partition/PartitionIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/partition/PartitionIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/partition/PartitionIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/partition/PartitionIT.java Thu Dec 31 12:21:49 2009
@@ -25,37 +25,19 @@
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import java.io.File;
 import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
 
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.BasicAttributes;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.constants.ServerDNConstants;
-import org.apache.directory.server.core.DefaultDirectoryService;
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.DirectoryServiceFactory;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.Factory;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
-import org.apache.directory.server.core.partition.ldif.LdifPartition;
-import org.apache.directory.server.core.schema.SchemaPartition;
-import org.apache.directory.server.xdbm.Index;
-import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
-import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.DefaultSchemaLdifExtractor;
-import org.apache.directory.shared.ldap.schema.loader.ldif.JarLdifSchemaLoader;
-import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
-import org.apache.directory.shared.ldap.util.ExceptionUtils;
+import org.apache.directory.server.core.annotations.ContextEntry;
+import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.annotations.CreateIndex;
+import org.apache.directory.server.core.annotations.CreatePartition;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.slf4j.Logger;
@@ -68,115 +50,50 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith(CiRunner.class)
-@Factory(PartitionIT.Factory.class)
-@ApplyLdifs(
-    { "dn: dc=foo,dc=com", "objectClass: top", "objectClass: domain", "dc: foo",
-
-    "dn: dc=bar,dc=com", "objectClass: top", "objectClass: domain", "dc: bar" })
-public final class PartitionIT
-{
-    private static final Logger LOG = LoggerFactory.getLogger( PartitionIT.class );
-    public static DirectoryService service;
-
-    /**
-     * Creates a DirectoryService configured with two separate dc=com based 
-     * domains to test multiple partitions.
-     */
-    public static class Factory implements DirectoryServiceFactory
+@RunWith(FrameworkRunner.class)
+/*
+ * Creates a DirectoryService configured with two separate dc=com based 
+ * domains to test multiple partitions.
+ */
+@CreateDS( name = "PartitionIT-class",
+    partitions =
     {
-        public DirectoryService newInstance() throws Exception
-        {
-            String workingDirectory = System.getProperty( "workingDirectory" );
-
-            if ( workingDirectory == null )
+        @CreatePartition(
+            name = "foo",
+            suffix = "dc=foo,dc=com",
+            contextEntry = @ContextEntry( 
+                entryLdif =
+                    "dn: dc=foo,dc=com\n" +
+                    "dc: foo\n" +
+                    "objectClass: top\n" +
+                    "objectClass: domain\n\n" ),
+            indexes = 
             {
-                String path = DirectoryServiceFactory.class.getResource( "" ).getPath();
-                int targetPos = path.indexOf( "target" );
-                workingDirectory = path.substring( 0, targetPos + 6 ) + "/server-work";
-            }
-
-            service = new DefaultDirectoryService();
-            service.setWorkingDirectory( new File( workingDirectory ) );
-
-            return service;
-        }
-
-
-        public void init() throws Exception
-        {
-            SchemaPartition schemaPartition = service.getSchemaService().getSchemaPartition();
-
-            // Init the LdifPartition
-            LdifPartition ldifPartition = new LdifPartition();
-
-            String workingDirectory = service.getWorkingDirectory().getPath();
-
-            ldifPartition.setWorkingDirectory( workingDirectory + "/schema" );
-
-            // Extract the schema on disk (a brand new one) and load the registries
-            File schemaRepository = new File( workingDirectory, "schema" );
-            SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory ) );
-
-            schemaPartition.setWrappedPartition( ldifPartition );
-
-            JarLdifSchemaLoader loader = new JarLdifSchemaLoader();
-
-            SchemaManager schemaManager = new DefaultSchemaManager( loader );
-            service.setSchemaManager( schemaManager );
-
-            schemaManager.loadAllEnabled();
-
-            List<Throwable> errors = schemaManager.getErrors();
-
-            if ( errors.size() != 0 )
-            {
-                fail( "Schema load failed : " + ExceptionUtils.printErrors( errors ) );
-            }
-
-            schemaPartition.setSchemaManager( schemaManager );
-
-            extractor.extractOrCopy();
-
-            service.getChangeLog().setEnabled( true );
-
-            // change the working directory to something that is unique
-            // on the system and somewhere either under target directory
-            // or somewhere in a temp area of the machine.
-
-            // Inject the System Partition
-            Partition systemPartition = new JdbmPartition();
-            systemPartition.setId( "system" );
-            ( ( JdbmPartition ) systemPartition ).setCacheSize( 500 );
-            systemPartition.setSuffix( ServerDNConstants.SYSTEM_DN );
-            systemPartition.setSchemaManager( schemaManager );
-            ( ( JdbmPartition ) systemPartition ).setPartitionDir( new File( workingDirectory, "system" ) );
-
-            // Add objectClass attribute for the system partition
-            Set<Index<?, ServerEntry>> indexedAttrs = new HashSet<Index<?, ServerEntry>>();
-            indexedAttrs.add( new JdbmIndex<Object, ServerEntry>( SchemaConstants.OBJECT_CLASS_AT ) );
-            ( ( JdbmPartition ) systemPartition ).setIndexedAttributes( indexedAttrs );
-
-            service.setSystemPartition( systemPartition );
-            schemaPartition.setSchemaManager( schemaManager );
-
-            Partition foo = new JdbmPartition();
-            foo.setId( "foo" );
-            foo.setSuffix( "dc=foo,dc=com" );
-            foo.setSchemaManager( schemaManager );
-            ( ( JdbmPartition ) foo ).setPartitionDir( new File( workingDirectory, "foo" ) );
-            service.addPartition( foo );
-
-            Partition bar = new JdbmPartition();
-            bar.setId( "bar" );
-            bar.setSuffix( "dc=bar,dc=com" );
-            bar.setSchemaManager( schemaManager );
-            ( ( JdbmPartition ) bar ).setPartitionDir( new File( workingDirectory, "bar" ) );
-            service.addPartition( bar );
-        }
-    }
-
+                @CreateIndex( attribute = "objectClass" ),
+                @CreateIndex( attribute = "dc" ),
+                @CreateIndex( attribute = "ou" )
+            } ),
+            @CreatePartition(
+                name = "bar",
+                suffix = "dc=bar,dc=com",
+                contextEntry = @ContextEntry( 
+                    entryLdif =
+                        "dn: dc=bar,dc=com\n" +
+                        "dc: bar\n" +
+                        "objectClass: top\n" +
+                        "objectClass: domain\n\n" ),
+                indexes = 
+                {
+                    @CreateIndex( attribute = "objectClass" ),
+                    @CreateIndex( attribute = "dc" ),
+                    @CreateIndex( attribute = "ou" )
+                } )
+    } )
+public final class PartitionIT extends AbstractLdapTestUnit
+{
+    private static final Logger LOG = LoggerFactory.getLogger( PartitionIT.class );
 
+    
     /**
      * Test case to weed out issue in DIRSERVER-1118.
      *

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java Thu Dec 31 12:21:49 2009
@@ -35,11 +35,7 @@
 import javax.naming.directory.DirContext;
 import javax.naming.directory.ModificationItem;
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
 import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java Thu Dec 31 12:21:49 2009
@@ -38,11 +38,7 @@
 import javax.naming.directory.DirContext;
 import javax.naming.directory.ModificationItem;
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
 import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java Thu Dec 31 12:21:49 2009
@@ -35,11 +35,7 @@
 import javax.naming.directory.DirContext;
 import javax.naming.directory.ModificationItem;
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
 import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java Thu Dec 31 12:21:49 2009
@@ -35,12 +35,8 @@
 import javax.naming.directory.ModificationItem;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import org.apache.directory.shared.ldap.constants.MetaSchemaConstants;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java Thu Dec 31 12:21:49 2009
@@ -38,11 +38,7 @@
 import javax.naming.directory.DirContext;
 import javax.naming.directory.ModificationItem;
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
 import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java Thu Dec 31 12:21:49 2009
@@ -42,11 +42,7 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
 import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java?rev=894830&r1=894829&r2=894830&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java Thu Dec 31 12:21:49 2009
@@ -55,6 +55,7 @@
 import javax.naming.ldap.LdapContext;
 
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.annotations.CreateDS;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerEntryUtils;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
@@ -98,6 +99,7 @@
  * @version $Rev$
  */
 @RunWith ( FrameworkRunner.class )
+@CreateDS( name="SubschemaSubentryIT-class" )
 public class SubschemaSubentryIT extends AbstractLdapTestUnit 
 {
     private static final String GLOBAL_SUBSCHEMA_DN = "cn=schema";



Mime
View raw message