Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E2593E346 for ; Sat, 25 May 2013 10:12:44 +0000 (UTC) Received: (qmail 31226 invoked by uid 500); 25 May 2013 10:12:43 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 31153 invoked by uid 500); 25 May 2013 10:12:42 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 31123 invoked by uid 99); 25 May 2013 10:12:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 May 2013 10:12:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 May 2013 10:12:39 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B6D6F2388900; Sat, 25 May 2013 10:12:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130525101219.B6D6F2388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 ); }