directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1486307 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
Date Sat, 25 May 2013 10:12:19 GMT
Author: elecharny
Date: Sat May 25 10:12:19 2013
New Revision: 1486307

URL: http://svn.apache.org/r1486307
Log:
Speedup the core-integ searchIT tests

Modified:
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java?rev=1486307&r1=1486306&r2=1486307&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
Sat May 25 10:12:19 2013
@@ -202,92 +202,9 @@ public class SearchIT extends AbstractLd
      * @throws NamingException on errors
      */
     @Before
-    public void createData() throws Exception
+    public void init() throws Exception
     {
         sysRoot = getSystemContext( getService() );
-    
-        /*
-         * Check ou=testing00,ou=system
-         */
-        DirContext ctx = ( DirContext ) sysRoot.lookup( "ou=testing00" );
-        assertNotNull( ctx );
-        Attributes attributes = ctx.getAttributes( "" );
-        assertNotNull( attributes );
-        assertEquals( "testing00", attributes.get( "ou" ).get() );
-        Attribute attribute = attributes.get( "objectClass" );
-        assertNotNull( attribute );
-        assertTrue( attribute.contains( "top" ) );
-        assertTrue( attribute.contains( "organizationalUnit" ) );
-    
-        /*
-         * check ou=testing01,ou=system
-         */
-        ctx = ( DirContext ) sysRoot.lookup( "ou=testing01" );
-        assertNotNull( ctx );
-        attributes = ctx.getAttributes( "" );
-        assertNotNull( attributes );
-        assertEquals( "testing01", attributes.get( "ou" ).get() );
-        attribute = attributes.get( "objectClass" );
-        assertNotNull( attribute );
-        assertTrue( attribute.contains( "top" ) );
-        assertTrue( attribute.contains( "organizationalUnit" ) );
-    
-        /*
-         * Check ou=testing02,ou=system
-         */
-        ctx = ( DirContext ) sysRoot.lookup( "ou=testing02" );
-        assertNotNull( ctx );
-    
-        attributes = ctx.getAttributes( "" );
-        assertNotNull( attributes );
-        assertEquals( "testing02", attributes.get( "ou" ).get() );
-    
-        attribute = attributes.get( "objectClass" );
-        assertNotNull( attribute );
-        assertTrue( attribute.contains( "top" ) );
-        assertTrue( attribute.contains( "organizationalUnit" ) );
-    
-        /*
-         * Check ou=subtest,ou=testing01,ou=system
-         */
-        ctx = ( DirContext ) sysRoot.lookup( "ou=subtest,ou=testing01" );
-        assertNotNull( ctx );
-    
-        attributes = ctx.getAttributes( "" );
-        assertNotNull( attributes );
-        assertEquals( "subtest", attributes.get( "ou" ).get() );
-    
-        attribute = attributes.get( "objectClass" );
-        assertNotNull( attribute );
-        assertTrue( attribute.contains( "top" ) );
-        assertTrue( attribute.contains( "organizationalUnit" ) );
-    
-        /*
-         *  Check entry cn=Heather Nova, ou=system
-         */
-        ctx = ( DirContext ) sysRoot.lookup( RDN );
-        assertNotNull( ctx );
-    
-        // -------------------------------------------------------------------
-        // Add a bunch of nis groups
-        // -------------------------------------------------------------------
-        //addNisPosixGroup( "testGroup0", 0 );
-        //addNisPosixGroup( "testGroup1", 1 );
-        //addNisPosixGroup( "testGroup2", 2 );
-        //addNisPosixGroup( "testGroup4", 4 );
-        //addNisPosixGroup( "testGroup5", 5 );
-    }
-    
-    
-    /**
-     * Create a NIS group
-     */
-    private static DirContext addNisPosixGroup( String name, int gid ) throws Exception
-    {
-        Attributes attrs = LdifUtils.createJndiAttributes( "objectClass: top", "objectClass:
posixGroup", "cn", name,
-            "gidNumber", String.valueOf( gid ) );
-    
-        return getSystemContext( getService() ).createSubcontext( "cn=" + name + ",ou=groups",
attrs );
     }
     
     



Mime
View raw message