directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1071769 [3/4] - in /directory/apacheds/branches/m1: core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/ kerberos-test/src/test/java/org/apache/directory/server/kerberos/kdc/ ldap-client-test/src/test/java/org/apache/di...
Date Thu, 17 Feb 2011 20:23:42 GMT
Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java Thu Feb 17 20:23:38 2011
@@ -20,7 +20,7 @@
 package org.apache.directory.server.operations.search;
 
  
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext; 
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -354,8 +354,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest1() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, (int)LdapServer.NO_SIZE_LIMIT, 3 );
         
         doLoop( ctx, controls, 3, 4, 10, false );
@@ -373,8 +373,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest2() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, (int)LdapServer.NO_SIZE_LIMIT, 5 );
         
         doLoop( ctx, controls, 5, 2, 10, false );
@@ -392,8 +392,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchTest3() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 3 );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( 3 );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, (int)LdapServer.NO_SIZE_LIMIT, 5 );
         
         doLoop( ctx, controls, 5, 2, 10, false );
@@ -411,8 +411,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchTest4() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, 3, 5 );
         
         doLoop( ctx, controls, 5, 1, 3, true );
@@ -430,8 +430,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest5() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 5 );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( 5 );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, (int)LdapServer.NO_SIZE_LIMIT, 3 );
 
         doLoop( ctx, controls, 3, 4, 10, false );
@@ -449,8 +449,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchTest6() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, 9, 5 );
         
         doLoop( ctx, controls, 5, 2, 9, true );
@@ -468,8 +468,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest7() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 5 );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( 5 );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, (int)LdapServer.NO_SIZE_LIMIT, 5 );
         
         doLoop( ctx, controls, 5, 2, 10, false );
@@ -487,8 +487,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchTest8() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, 5, 5 );
         
         doLoop( ctx, controls, 5, 1, 5, true );
@@ -506,8 +506,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchTest9() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 5 );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( 5 );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, 4, 3 );
         
         doLoop( ctx, controls, 3, 2, 4, true );
@@ -525,8 +525,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest10() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 4 );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( 4 );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, 5, 3 );
         
         doLoop( ctx, controls, 3, 2, 5, true );
@@ -544,8 +544,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest11() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 5 );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( 5 );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, 3, 4 );
         
         doLoop( ctx, controls, 4, 1, 3, true );
@@ -563,8 +563,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest12() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 5 );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( 5 );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, 4, 3 );
         
         doLoop( ctx, controls, 3, 2, 4, true );
@@ -582,8 +582,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest13() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 4 );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( 4 );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, 5, 3 );
         
         doLoop( ctx, controls, 3, 2, 5, true );
@@ -601,8 +601,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest14() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 4 );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( 4 );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, 3, 5 );
         
         doLoop( ctx, controls, 5, 1, 3, true );
@@ -620,8 +620,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest15() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 3 );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( 3 );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, 5, 4 );
         
         doLoop( ctx, controls, 4, 2, 5, true );
@@ -639,8 +639,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest16() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 3 );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( 3 );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, 4, 5 );
         
         doLoop( ctx, controls, 5, 1, 4, true );
@@ -658,8 +658,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest17() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 5 );
-        DirContext ctx = getWiredContext( ldapServer );
+        getLdapServer().setMaxSizeLimit( 5 );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = createSearchControls( ctx, 5, 5 );
         
         doLoop( ctx, controls, 5, 1, 5, true );
@@ -677,8 +677,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest18() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, (int)LdapServer.NO_SIZE_LIMIT, 3 );
         
         doLoop( ctx, controls, 3, 4, 10, false );
@@ -696,8 +696,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest19() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, (int)LdapServer.NO_SIZE_LIMIT, 5 );
         
         doLoop( ctx, controls, 5, 2, 10, false );
@@ -715,8 +715,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchTest20() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 3 );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( 3 );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, (int)LdapServer.NO_SIZE_LIMIT, 5 );
         
         doLoop( ctx, controls, 5, 1, 3, true );
@@ -734,8 +734,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchTest21() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, 3, 5 );
         
         doLoop( ctx, controls, 5, 1, 3, true );
@@ -753,8 +753,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest22() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 5 );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( 5 );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, (int)LdapServer.NO_SIZE_LIMIT, 3 );
         
         doLoop( ctx, controls, 3, 2, 5, true );
@@ -772,8 +772,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchTest23() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, 9, 5 );
         
         
@@ -792,8 +792,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest24() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 5 );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( 5 );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, (int)LdapServer.NO_SIZE_LIMIT, 5 );
         
         doLoop( ctx, controls, 5, 1, 5, true );
@@ -811,8 +811,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchTest25() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, 5, 5 );
         
         
@@ -831,8 +831,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchTest26() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 5 );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( 5 );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, 4, 3 );
         
         doLoop( ctx, controls, 3, 2, 4, true );
@@ -850,8 +850,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest27() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 4 );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( 4 );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, 5, 3 );
         
         doLoop( ctx, controls, 3, 2, 4, true );
@@ -869,8 +869,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest28() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 5 );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( 5 );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, 3, 4 );
         
         doLoop( ctx, controls, 4, 1, 3, true );
@@ -888,8 +888,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest29() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 5 );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( 5 );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, 4, 3 );
         
         doLoop( ctx, controls, 3, 2, 4, true );
@@ -907,8 +907,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest30() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 4 );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( 4 );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, 5, 3 );
         
         doLoop( ctx, controls, 3, 2, 4, true );
@@ -926,8 +926,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest31() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 4 );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( 4 );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, 3, 5 );
         
         doLoop( ctx, controls, 3, 1, 3, true );
@@ -945,8 +945,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest32() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 3 );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( 3 );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, 5, 4 );
         
         doLoop( ctx, controls, 3, 1, 3, true );
@@ -964,8 +964,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest33() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 3 );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( 3 );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, 4, 5 );
         
         doLoop( ctx, controls, 3, 1, 3, true );
@@ -983,8 +983,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchtest34() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 5 );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( 5 );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, 5, 5 );
         
         doLoop( ctx, controls, 5, 1, 5, true );
@@ -1002,8 +1002,8 @@ public class PagedSearchIT extends Abstr
     @Test
     public void testPagedSearchWithNegativePL() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, (int)LdapServer.NO_SIZE_LIMIT, -2 );
         
         doLoop( ctx, controls, -2, 1, 10, false );
@@ -1016,8 +1016,8 @@ public class PagedSearchIT extends Abstr
     @Test 
     public void testPagedSearchWrongCookie() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, (int)LdapServer.NO_SIZE_LIMIT, 3 );
 
         // Loop over all the elements
@@ -1078,8 +1078,8 @@ public class PagedSearchIT extends Abstr
     @Test 
     public void testPagedSearchModifyingPagedLimit() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
-        DirContext ctx = getWiredContext( ldapServer, "cn=user,ou=system", "secret" );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" );
         SearchControls controls = createSearchControls( ctx, (int)LdapServer.NO_SIZE_LIMIT, 4 );
 
         // Loop over all the elements

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java Thu Feb 17 20:23:38 2011
@@ -129,8 +129,8 @@ public class PersistentSearchIT extends 
     private void setUpListener( boolean returnECs, PersistentSearch persistentSearch, boolean ignoreEmptyRegistryCheck )
         throws Exception
     {
-        ctx = ( EventDirContext ) getWiredContext( ldapServer).lookup( BASE );
-        eventService = ldapServer.getDirectoryService().getEventService();
+        ctx = ( EventDirContext ) getWiredContext( getLdapServer()).lookup( BASE );
+        eventService = getLdapServer().getDirectoryService().getEventService();
         List<RegistrationEntry> registrationEntryList = eventService.getRegistrationEntries();
         
         if ( ! ignoreEmptyRegistryCheck )
@@ -156,8 +156,8 @@ public class PersistentSearchIT extends 
     
     private void setUpListener() throws Exception
     {
-        ctx = ( EventDirContext ) getWiredContext( ldapServer).lookup( BASE );
-        eventService = ldapServer.getDirectoryService().getEventService();
+        ctx = ( EventDirContext ) getWiredContext( getLdapServer()).lookup( BASE );
+        eventService = getLdapServer().getDirectoryService().getEventService();
         List<RegistrationEntry> registrationEntryList = eventService.getRegistrationEntries();
         assertTrue( registrationEntryList.isEmpty() );
         
@@ -530,14 +530,14 @@ public class PersistentSearchIT extends 
         
         PSearchListener()
         {
-            persistentSearch = new PersistentSearchDecorator( ldapServer.getDirectoryService().getLdapCodecService() );
+            persistentSearch = new PersistentSearchDecorator( getLdapServer().getDirectoryService().getLdapCodecService() );
         }
 
 
         PSearchListener( PersistentSearch persistentSearch )
         {
             CodecControl<? extends Control> wrapped = 
-                ldapServer.getDirectoryService().getLdapCodecService().newControl( persistentSearch );
+                getLdapServer().getDirectoryService().getLdapCodecService().newControl( persistentSearch );
             this.persistentSearch = ( PersistentSearchDecorator ) wrapped;
         }
 
@@ -575,7 +575,7 @@ public class PersistentSearchIT extends 
         public void run()
         {
             LOG.debug( "PSearchListener.run() called." );
-            LdapCodecService codec = ldapServer.getDirectoryService().getLdapCodecService();
+            LdapCodecService codec = getLdapServer().getDirectoryService().getLdapCodecService();
             persistentSearch.setCritical( true );
             persistentSearch.setValue( persistentSearch.getValue() );
 
@@ -583,7 +583,7 @@ public class PersistentSearchIT extends 
 
             try
             {
-                ctx = ( LdapContext ) getWiredContext( ldapServer).lookup( BASE );
+                ctx = ( LdapContext ) getWiredContext( getLdapServer()).lookup( BASE );
                 ctx.setRequestControls( JndiUtils.toJndiControls( codec, ctxCtls) );
                 isReady = true;
                 LOG.debug( "PSearchListener is ready and about to issue persistent search request." );

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java Thu Feb 17 20:23:38 2011
@@ -134,22 +134,22 @@ public class ReferralSearchIT extends Ab
         "objectClass: referral\n" +
         "objectClass: extensibleObject\n" +
         "c: europ\n" +
-        "ref: ldap://localhost:" + ldapServer.getPort() + "/c=france,ou=system\n\n" +
+        "ref: ldap://localhost:" + getLdapServer().getPort() + "/c=france,ou=system\n\n" +
 
         "dn: c=america,ou=Countries,ou=system\n" +
         "objectClass: top\n" +
         "objectClass: referral\n" +
         "objectClass: extensibleObject\n" +
         "c: america\n" +
-        "ref: ldap://localhost:" + ldapServer.getPort() + "/c=usa,ou=system\n\n";
+        "ref: ldap://localhost:" + getLdapServer().getPort() + "/c=usa,ou=system\n\n";
 
         LdifReader reader = new LdifReader( new StringReader( ldif ) );
         
         while ( reader.hasNext() )
         {
             LdifEntry entry = reader.next();
-            ldapServer.getDirectoryService().getAdminSession().add( 
-                new DefaultEntry( ldapServer.getDirectoryService().getSchemaManager(), entry.getEntry() ) ); 
+            getLdapServer().getDirectoryService().getAdminSession().add( 
+                new DefaultEntry( getLdapServer().getDirectoryService().getSchemaManager(), entry.getEntry() ) ); 
         }
     }
     
@@ -157,7 +157,7 @@ public class ReferralSearchIT extends Ab
     @Test
     public void testSearchBaseIsReferral() throws Exception
     {
-        DirContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        DirContext ctx = getWiredContextThrowOnRefferal( getLdapServer() );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         
@@ -181,7 +181,7 @@ public class ReferralSearchIT extends Ab
     @Test
     public void testSearchBaseParentIsReferral() throws Exception
     {
-        DirContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        DirContext ctx = getWiredContextThrowOnRefferal( getLdapServer() );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
 
@@ -204,7 +204,7 @@ public class ReferralSearchIT extends Ab
     @Test
     public void testSearchBaseAncestorIsReferral() throws Exception
     {
-        DirContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        DirContext ctx = getWiredContextThrowOnRefferal( getLdapServer() );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
 
@@ -229,7 +229,7 @@ public class ReferralSearchIT extends Ab
     @Test
     public void testSearchContinuations() throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( getLdapServer() );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
@@ -332,7 +332,7 @@ public class ReferralSearchIT extends Ab
     @Test
     public void testSearchWithReferralThrow() throws Exception
     {
-        DirContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        DirContext ctx = getWiredContextThrowOnRefferal( getLdapServer() );
 
         try
         {
@@ -344,7 +344,7 @@ public class ReferralSearchIT extends Ab
         catch ( ReferralException re )
         {
             String referral = (String)re.getReferralInfo();
-            assertEquals( "ldap://localhost:" + ldapServer.getPort() + "/c=usa,ou=system??sub", referral );
+            assertEquals( "ldap://localhost:" + getLdapServer().getPort() + "/c=usa,ou=system??sub", referral );
         }
     }
 
@@ -359,7 +359,7 @@ public class ReferralSearchIT extends Ab
     @Test
     public void testSearchBaseWithReferralThrow() throws Exception
     {
-        DirContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        DirContext ctx = getWiredContextThrowOnRefferal( getLdapServer() );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -372,7 +372,7 @@ public class ReferralSearchIT extends Ab
         catch ( ReferralException re )
         {
             String referral = (String)re.getReferralInfo();
-            assertEquals( "ldap://localhost:" + ldapServer.getPort() + "/c=usa,ou=system??base", referral );
+            assertEquals( "ldap://localhost:" + getLdapServer().getPort() + "/c=usa,ou=system??base", referral );
         }
     }
 
@@ -388,7 +388,7 @@ public class ReferralSearchIT extends Ab
     @Test
     public void testSearchBaseWithReferralThrowAfterRename() throws Exception
     {
-        DirContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        DirContext ctx = getWiredContextThrowOnRefferal( getLdapServer() );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -401,7 +401,7 @@ public class ReferralSearchIT extends Ab
         catch ( ReferralException re )
         {
             String referral = (String)re.getReferralInfo();
-            assertEquals( "ldap://localhost:" + ldapServer.getPort() + "/c=usa,ou=system??base", referral );
+            assertEquals( "ldap://localhost:" + getLdapServer().getPort() + "/c=usa,ou=system??base", referral );
         }
         
         ((LdapContext)ctx).setRequestControls( new javax.naming.ldap.Control[]{new ManageReferralControl()} );
@@ -421,7 +421,7 @@ public class ReferralSearchIT extends Ab
         catch ( ReferralException re )
         {
             String referral = (String)re.getReferralInfo();
-            assertEquals( "ldap://localhost:" + ldapServer.getPort() + "/c=usa,ou=system??base", referral );
+            assertEquals( "ldap://localhost:" + getLdapServer().getPort() + "/c=usa,ou=system??base", referral );
         }
     }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchMoveAndRenameIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchMoveAndRenameIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchMoveAndRenameIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchMoveAndRenameIT.java Thu Feb 17 20:23:38 2011
@@ -116,7 +116,7 @@ public class ReferralSearchMoveAndRename
     @Before
     public void setupReferrals() throws Exception
     {
-        ldapServer.getDirectoryService().getChangeLog().setEnabled( false );
+        getLdapServer().getDirectoryService().getChangeLog().setEnabled( false );
         
         String ldif =
         "dn: c=europ,ou=Countries,ou=system\n" +
@@ -124,22 +124,22 @@ public class ReferralSearchMoveAndRename
         "objectClass: referral\n" +
         "objectClass: extensibleObject\n" +
         "c: europ\n" +
-        "ref: ldap://localhost:" + ldapServer.getPort() + "/c=france,ou=system\n\n" +
+        "ref: ldap://localhost:" + getLdapServer().getPort() + "/c=france,ou=system\n\n" +
 
         "dn: c=america,ou=Countries,ou=system\n" +
         "objectClass: top\n" +
         "objectClass: referral\n" +
         "objectClass: extensibleObject\n" +
         "c: america\n" +
-        "ref: ldap://localhost:" + ldapServer.getPort() + "/c=usa,ou=system\n\n";
+        "ref: ldap://localhost:" + getLdapServer().getPort() + "/c=usa,ou=system\n\n";
 
         LdifReader reader = new LdifReader( new StringReader( ldif ) );
         
         while ( reader.hasNext() )
         {
             LdifEntry entry = reader.next();
-            ldapServer.getDirectoryService().getAdminSession().add( 
-                new DefaultEntry( ldapServer.getDirectoryService().getSchemaManager(), entry.getEntry() ) ); 
+            getLdapServer().getDirectoryService().getAdminSession().add( 
+                new DefaultEntry( getLdapServer().getDirectoryService().getSchemaManager(), entry.getEntry() ) ); 
         }
     }
     
@@ -156,7 +156,7 @@ public class ReferralSearchMoveAndRename
     @Test
     public void testSearchBaseWithReferralThrowAfterMoveAndRename() throws Exception
     {
-        DirContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        DirContext ctx = getWiredContextThrowOnRefferal( getLdapServer() );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -169,7 +169,7 @@ public class ReferralSearchMoveAndRename
         catch ( ReferralException re )
         {
             String referral = (String)re.getReferralInfo();
-            assertEquals( "ldap://localhost:" + ldapServer.getPort() + "/c=usa,ou=system??base", referral );
+            assertEquals( "ldap://localhost:" + getLdapServer().getPort() + "/c=usa,ou=system??base", referral );
         }
         
         ((LdapContext)ctx).setRequestControls( new javax.naming.ldap.Control[]{new ManageReferralControl()} );
@@ -191,7 +191,7 @@ public class ReferralSearchMoveAndRename
         catch ( ReferralException re )
         {
             String referral = (String)re.getReferralInfo();
-            assertEquals( "ldap://localhost:" + ldapServer.getPort() + "/c=usa,ou=system??base", referral );
+            assertEquals( "ldap://localhost:" + getLdapServer().getPort() + "/c=usa,ou=system??base", referral );
         }
     }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchNoRevertIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchNoRevertIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchNoRevertIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchNoRevertIT.java Thu Feb 17 20:23:38 2011
@@ -140,7 +140,7 @@ public class ReferralSearchNoRevertIT ex
     @Before
     public void setupReferrals() throws Exception
     {
-        ldapServer.getDirectoryService().getChangeLog().setEnabled( false );
+        getLdapServer().getDirectoryService().getChangeLog().setEnabled( false );
 
         String ldif =
         "dn: c=europ,ou=Countries,ou=system\n" +
@@ -148,21 +148,21 @@ public class ReferralSearchNoRevertIT ex
         "objectClass: referral\n" +
         "objectClass: extensibleObject\n" +
         "c: europ\n" +
-        "ref: ldap://localhost:" + ldapServer.getPort() + "/c=france,ou=system\n\n" +
+        "ref: ldap://localhost:" + getLdapServer().getPort() + "/c=france,ou=system\n\n" +
 
         "dn: c=america,ou=Countries,ou=system\n" +
         "objectClass: top\n" +
         "objectClass: referral\n" +
         "objectClass: extensibleObject\n" +
         "c: america\n" +
-        "ref: ldap://localhost:" + ldapServer.getPort() + "/c=usa,ou=system\n\n";
+        "ref: ldap://localhost:" + getLdapServer().getPort() + "/c=usa,ou=system\n\n";
 
         LdifReader reader = new LdifReader( new StringReader( ldif ) );
         while ( reader.hasNext() )
         {
             LdifEntry entry = reader.next();
-            ldapServer.getDirectoryService().getAdminSession().add( 
-                new DefaultEntry( ldapServer.getDirectoryService().getSchemaManager(), entry.getEntry() ) );
+            getLdapServer().getDirectoryService().getAdminSession().add( 
+                new DefaultEntry( getLdapServer().getDirectoryService().getSchemaManager(), entry.getEntry() ) );
         }
     }
 
@@ -178,7 +178,7 @@ public class ReferralSearchNoRevertIT ex
     @Test
     public void testSearchBaseWithReferralThrowAfterMove() throws Exception
     {
-        DirContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        DirContext ctx = getWiredContextThrowOnRefferal( getLdapServer() );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -191,7 +191,7 @@ public class ReferralSearchNoRevertIT ex
         catch ( ReferralException re )
         {
             String referral = (String)re.getReferralInfo();
-            assertEquals( "ldap://localhost:" + ldapServer.getPort() + "/c=usa,ou=system??base", referral );
+            assertEquals( "ldap://localhost:" + getLdapServer().getPort() + "/c=usa,ou=system??base", referral );
         }
         
         ((LdapContext)ctx).setRequestControls( new javax.naming.ldap.Control[]{new ManageReferralControl()} );
@@ -211,13 +211,13 @@ public class ReferralSearchNoRevertIT ex
         catch ( ReferralException re )
         {
             String referral = (String)re.getReferralInfo();
-            assertEquals( "ldap://localhost:" + ldapServer.getPort() + "/c=usa,ou=system??base", referral );
+            assertEquals( "ldap://localhost:" + getLdapServer().getPort() + "/c=usa,ou=system??base", referral );
         }
     }
     
     @After
     public void after()
     {
-        ldapServer.getDirectoryService().getChangeLog().setEnabled( true );
+        getLdapServer().getDirectoryService().getChangeLog().setEnabled( true );
     }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java Thu Feb 17 20:23:38 2011
@@ -188,7 +188,7 @@ public class SchemaSearchIT extends Abst
     @Test
     public void testRequestOperationalAttributes() throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls ctls = new SearchControls();
 
         String[] attrNames =
@@ -220,7 +220,7 @@ public class SchemaSearchIT extends Abst
     @Test
     public void testRequestAllOperationalAttributes() throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( getLdapServer() );
         SearchControls ctls = new SearchControls();
 
         ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -252,7 +252,7 @@ public class SchemaSearchIT extends Abst
     @Test
     public void testSearchingNewSchemaElements() throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( getLdapServer() );
         
         // create an entry with the schema objectClass personActiveDirectory
         Attributes person = new BasicAttributes( "objectClass", "top", true );
@@ -297,7 +297,7 @@ public class SchemaSearchIT extends Abst
     @Test
     public void testRequestWithoutManageDsaITControl() throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( getLdapServer() );
 
         // this removes the ManageDsaIT decorator from the search request
         ctx.addToEnvironment( DirContext.REFERRAL, "throw" );
@@ -331,7 +331,7 @@ public class SchemaSearchIT extends Abst
     @Test
     public void testSubSchemaSubEntrySearch() throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( getLdapServer() );
 
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.OBJECT_SCOPE );

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java Thu Feb 17 20:23:38 2011
@@ -53,9 +53,6 @@ import org.apache.directory.server.annot
 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.server.ldap.LdapServer;
-import org.apache.directory.shared.ldap.model.message.controls.SubentriesImpl;
-import org.apache.directory.shared.ldap.model.message.controls.Subentries;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
@@ -66,6 +63,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.Response;
 import org.apache.directory.shared.ldap.model.message.SearchRequest;
 import org.apache.directory.shared.ldap.model.message.SearchRequestImpl;
+import org.apache.directory.shared.ldap.model.message.controls.Subentries;
+import org.apache.directory.shared.ldap.model.message.controls.SubentriesImpl;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.util.JndiUtils;
 import org.junit.Ignore;
@@ -185,7 +184,7 @@ public class SearchIT extends AbstractLd
 {
     private static final String BASE = "ou=system";
 
-    public static LdapServer ldapServer;
+    //public static LdapServer getLdapServer();
 
     private static final String RDN = "cn=Tori Amos";
     private static final String RDN2 = "cn=Rolling-Stones";
@@ -253,7 +252,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchByBinaryAttribute() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
         byte[] certData = new byte[]
             { 0x34, 0x56, 0x4e, 0x5f };
 
@@ -303,7 +302,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearch() throws Exception
     {
-        LdapContext ctx = getWiredContext( ldapServer );
+        LdapContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
         controls.setTimeLimit( 10 );
@@ -355,7 +354,7 @@ public class SearchIT extends AbstractLd
      */
     private Set<String> search( String filter ) throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         NamingEnumeration<SearchResult> ii = ctx.search( "", filter, controls );
@@ -406,7 +405,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchWithBackslashEscapedBase() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         // create additional entry
         Attributes attributes = this.getPersonAttributes( "Ferry", "Bryan Ferry" );
@@ -448,7 +447,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchValue() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         // Setting up search controls for compare op
         SearchControls ctls = new SearchControls();
@@ -589,7 +588,7 @@ public class SearchIT extends AbstractLd
         controls.setReturningAttributes( new String[]
             { "objectClasses" } );
 
-        LdapContext ctx = getWiredContext( ldapServer );
+        LdapContext ctx = getWiredContext( getLdapServer() );
 
         NamingEnumeration<SearchResult> results = ctx.search( "cn=schema", "objectClass=subschema", controls );
         assertTrue( results.hasMore() );
@@ -622,7 +621,7 @@ public class SearchIT extends AbstractLd
      */
     private void createAccessControlSubentry( String cn, String subtree, String aciItem ) throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         DirContext adminCtx = ctx;
 
@@ -656,7 +655,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testAddWithObjectclasses() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         SearchControls ctls = new SearchControls();
         ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -692,7 +691,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testAddWithMissingObjectclasses() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         String rdn = "cn=Kate Bush";
         SearchControls ctls = new SearchControls();
@@ -725,7 +724,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSubentryControl() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         // create a real access decorator subentry
         createAccessControlSubentry( "anyBodyAdd", "{}", "{ " + "  identificationTag \"addAci\", "
@@ -743,7 +742,7 @@ public class SearchIT extends AbstractLd
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
 
-        ctx.setRequestControls( JndiUtils.toJndiControls( ldapServer.getDirectoryService().getLdapCodecService(),
+        ctx.setRequestControls( JndiUtils.toJndiControls( getLdapServer().getDirectoryService().getLdapCodecService(),
             reqControls ) );
         NamingEnumeration<SearchResult> enm = ctx.search( "", "(objectClass=*)", searchControls );
         Set<String> results = new HashSet<String>();
@@ -766,7 +765,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testMultiValuedRdnContent() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         Attributes attrs = getPersonAttributes( "Bush", "Kate Bush" );
         String rdn = "cn=Kate Bush+sn=Bush";
@@ -800,7 +799,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testMultiValuedRdnName() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         Attributes attrs = getPersonAttributes( "Bush", "Kate Bush" );
         String rdn = "cn=Kate Bush+sn=Bush";
@@ -831,7 +830,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchJpeg() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -864,7 +863,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchOID() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -891,7 +890,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchAttrCN() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -920,7 +919,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchAttrName() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -952,7 +951,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchAttrCommonName() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -986,7 +985,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchAttrOID() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -1020,7 +1019,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchAttrC_L() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         // create administrative area
         Attributes aaAttrs = new BasicAttributes( true );
@@ -1077,7 +1076,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchUsersAttrs() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -1111,7 +1110,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchOperationalAttrs() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -1147,7 +1146,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchAllAttrs() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -1183,7 +1182,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchBadDN() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
 
@@ -1201,7 +1200,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchInvalidDN() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -1224,7 +1223,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchOperationalAttributes() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
         SearchControls ctls = new SearchControls();
 
         ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -1257,7 +1256,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchUserAttributes() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
         SearchControls ctls = new SearchControls();
 
         ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -1290,7 +1289,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchUserAttributes_Space() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
         SearchControls ctls = new SearchControls();
 
         ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -1308,7 +1307,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchUserAttributes_EmptyAttrs() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
         SearchControls ctls = new SearchControls();
 
         ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -1326,7 +1325,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchUserAttributes_NullAttrs() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
         SearchControls ctls = new SearchControls();
 
         ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -1343,7 +1342,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchOperationalAndUserAttributes() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
         SearchControls ctls = new SearchControls();
 
         ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -1402,7 +1401,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSubstringSearchWithEscapedCharsInFilter() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         Attributes attrs = new BasicAttributes( "objectClass", "inetOrgPerson", true );
         attrs.get( "objectClass" ).add( "organizationalPerson" );
@@ -1445,7 +1444,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testMissingAnyInSubstring_DIRSERVER_1180() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
         Attributes attrs = new BasicAttributes( "objectClass", "inetOrgPerson", true );
         attrs.get( "objectClass" ).add( "organizationalPerson" );
         attrs.get( "objectClass" ).add( "person" );
@@ -1470,7 +1469,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSubstringSearchWithEscapedAsterisksInFilter_DIRSERVER_1181() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         Attributes vicious = new BasicAttributes( true );
         Attribute ocls = new BasicAttribute( "objectClass" );
@@ -1506,7 +1505,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testUnicodeFilter_DIRSERVER_1347() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         Attributes groupOfNames = new BasicAttributes( true );
         Attribute groupOfNamesOC = new BasicAttribute( "objectClass" );
@@ -1567,7 +1566,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchUserAttributes_1_1() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
         SearchControls ctls = new SearchControls();
 
         ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -1596,7 +1595,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testAbandonnedRequest() throws Exception
     {
-        LdapConnection asyncCnx = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
+        LdapConnection asyncCnx = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
 
         try
         {
@@ -1651,7 +1650,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchSubstringWithPlus() throws Exception
     {
-        LdapContext ctx = getWiredContext( ldapServer );
+        LdapContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         controls.setTimeLimit( 10 );
@@ -1670,7 +1669,7 @@ public class SearchIT extends AbstractLd
     public void testSearchSizeLimit() throws Exception
     {
         long sizeLimit = 7;
-        LdapConnection connection = getClientApiConnection( ldapServer );
+        LdapConnection connection = getClientApiConnection( getLdapServer() );
         SearchRequest req = new org.apache.directory.shared.ldap.model.message.SearchRequestImpl();
         req.setBase( new Dn( "ou=system" ) );
         req.setFilter( "(ou=*)" );
@@ -1693,7 +1692,7 @@ public class SearchIT extends AbstractLd
     @Ignore("This test is failing because of the timing issue. Note that the SearchHandler handles time based searches correctly, this is just the below test's problem")
     public void testSearchTimeLimit() throws Exception, InterruptedException
     {
-        LdapConnection connection = getClientApiConnection( ldapServer );
+        LdapConnection connection = getClientApiConnection( getLdapServer() );
         SearchRequest req = new SearchRequestImpl();
         req.setBase( new Dn( "ou=schema" ) );
         req.setFilter( "(objectClass=*)" );
@@ -1725,7 +1724,7 @@ public class SearchIT extends AbstractLd
     @Test
     public void testSearchComplexFilter() throws Exception
     {
-        LdapContext ctx = getWiredContext( ldapServer );
+        LdapContext ctx = getWiredContext( getLdapServer() );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
         controls.setTimeLimit( 10 );

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchLimitsIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchLimitsIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchLimitsIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchLimitsIT.java Thu Feb 17 20:23:38 2011
@@ -172,19 +172,19 @@ public class SearchLimitsIT extends Abst
     @Before
     public void setUp() throws Exception
     {
-        oldMaxTimeLimit = ldapServer.getMaxTimeLimit();
-        oldMaxSizeLimit = ldapServer.getMaxSizeLimit();
+        oldMaxTimeLimit = getLdapServer().getMaxTimeLimit();
+        oldMaxSizeLimit = getLdapServer().getMaxSizeLimit();
         delayInterceptor = new DelayInducingInterceptor();
-        ldapServer.getDirectoryService().getInterceptorChain().addFirst( delayInterceptor );
+        getLdapServer().getDirectoryService().getInterceptorChain().addFirst( delayInterceptor );
     }
     
     
     @After
     public void tearDown() throws Exception
     {
-        ldapServer.setMaxTimeLimit( oldMaxTimeLimit );
-        ldapServer.setMaxSizeLimit( oldMaxSizeLimit );
-        ldapServer.getDirectoryService().getInterceptorChain().remove( DelayInducingInterceptor.class.getName() );
+        getLdapServer().setMaxTimeLimit( oldMaxTimeLimit );
+        getLdapServer().setMaxSizeLimit( oldMaxSizeLimit );
+        getLdapServer().getDirectoryService().getInterceptorChain().remove( DelayInducingInterceptor.class.getName() );
     }
     
 
@@ -201,7 +201,7 @@ public class SearchLimitsIT extends Abst
     @Test ( expected = TimeLimitExceededException.class )
     public void testRequestConstrainedUnlimitByConfiguration() throws Exception
     {
-        ldapServer.setMaxTimeLimit( LdapServer.NO_TIME_LIMIT );
+        getLdapServer().setMaxTimeLimit( LdapServer.NO_TIME_LIMIT );
         delayInterceptor.setDelayMillis( 500 );
         
         getActorsWithLimit( "(objectClass=*)", 499, LdapServer.NO_SIZE_LIMIT );
@@ -216,7 +216,7 @@ public class SearchLimitsIT extends Abst
     @Test ( expected = TimeLimitExceededException.class )
     public void testRequestConstrainedLessThanConfiguration() throws Exception
     {
-        ldapServer.setMaxTimeLimit( 10000 ); // this is in seconds
+        getLdapServer().setMaxTimeLimit( 10000 ); // this is in seconds
         delayInterceptor.setDelayMillis( 500 );
         
         getActorsWithLimit( "(objectClass=*)", 499, LdapServer.NO_SIZE_LIMIT );
@@ -231,7 +231,7 @@ public class SearchLimitsIT extends Abst
     @Test ( expected = TimeLimitExceededException.class )
     public void testRequestConstrainedGreaterThanConfiguration() throws Exception
     {
-        ldapServer.setMaxTimeLimit( 1 ); // this is in seconds
+        getLdapServer().setMaxTimeLimit( 1 ); // this is in seconds
         delayInterceptor.setDelayMillis( 1100 );
         
         getActorsWithLimit( "(objectClass=*)", 100000, LdapServer.NO_SIZE_LIMIT );
@@ -245,7 +245,7 @@ public class SearchLimitsIT extends Abst
     @Test 
     public void testRequestUnlimitedConfigurationLimited() throws Exception
     {
-        ldapServer.setMaxTimeLimit( 1 ); // this is in seconds
+        getLdapServer().setMaxTimeLimit( 1 ); // this is in seconds
         delayInterceptor.setDelayMillis( 500 );
         
         getActorsWithLimit( "(objectClass=*)", 
@@ -260,7 +260,7 @@ public class SearchLimitsIT extends Abst
     @Test ( expected = TimeLimitExceededException.class ) 
     public void testNonAdminRequestUnlimitedConfigurationLimited() throws Exception
     {
-        ldapServer.setMaxTimeLimit( 1 ); // this is in seconds
+        getLdapServer().setMaxTimeLimit( 1 ); // this is in seconds
         delayInterceptor.setDelayMillis( 500 );
         
         getActorsWithLimitNonAdmin( "(objectClass=*)", 
@@ -281,7 +281,7 @@ public class SearchLimitsIT extends Abst
     @Test (expected = SizeLimitExceededException.class)
     public void testRequestConstrainedUnlimitByConfigurationSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
         
         getActorsWithLimit( "(objectClass=*)", LdapServer.NO_TIME_LIMIT, 1 );
     }
@@ -295,7 +295,7 @@ public class SearchLimitsIT extends Abst
     @Test ( expected = SizeLimitExceededException.class )
     public void testRequestConstrainedLessThanConfigurationSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 10000 ); 
+        getLdapServer().setMaxSizeLimit( 10000 ); 
 
         getActorsWithLimit( "(objectClass=*)", LdapServer.NO_TIME_LIMIT, 1 );
     }
@@ -309,7 +309,7 @@ public class SearchLimitsIT extends Abst
     @Test
     public void testRequestConstrainedGreaterThanConfigurationSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 1 ); 
+        getLdapServer().setMaxSizeLimit( 1 ); 
         Set<String> set = getActorsWithLimit( "(objectClass=*)", LdapServer.NO_TIME_LIMIT, 100000 );
         assertEquals( 4, set.size() );
     }
@@ -323,7 +323,7 @@ public class SearchLimitsIT extends Abst
     @Test (expected = SizeLimitExceededException.class ) 
     public void testNonAdminRequestConstrainedGreaterThanConfigurationSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 1 ); 
+        getLdapServer().setMaxSizeLimit( 1 ); 
         
         // We are not using the admin : it should fail
         getActorsWithLimitNonAdmin( "(objectClass=*)", LdapServer.NO_TIME_LIMIT, 100000 );
@@ -337,7 +337,7 @@ public class SearchLimitsIT extends Abst
     @Test 
     public void testRequestUnlimitedConfigurationLimitedSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 1 ); 
+        getLdapServer().setMaxSizeLimit( 1 ); 
         Set<String> set = getActorsWithLimit( "(objectClass=*)", 
             LdapServer.NO_TIME_LIMIT, LdapServer.NO_SIZE_LIMIT );
         
@@ -352,7 +352,7 @@ public class SearchLimitsIT extends Abst
     @Test ( expected = SizeLimitExceededException.class ) 
     public void testNonAdminRequestUnlimitedConfigurationLimitedSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 1 );
+        getLdapServer().setMaxSizeLimit( 1 );
         getActorsWithLimitNonAdmin( "(objectClass=*)", 
             LdapServer.NO_TIME_LIMIT, LdapServer.NO_SIZE_LIMIT );
     }
@@ -372,7 +372,7 @@ public class SearchLimitsIT extends Abst
     @Test ( expected = SizeLimitExceededException.class )
     public void testRequestConstraintedLessThanExpectedSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
         
         getActorsWithLimit( "(objectClass=*)", LdapServer.NO_TIME_LIMIT, 3 );
     }
@@ -387,7 +387,7 @@ public class SearchLimitsIT extends Abst
     @Test
     public void testRequestConstraintedEqualToExpectedSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
         Set<String> set = getActorsWithLimit( "(objectClass=*)", LdapServer.NO_TIME_LIMIT, 4 );
         assertEquals( 4, set.size() );
     }
@@ -402,7 +402,7 @@ public class SearchLimitsIT extends Abst
     @Test
     public void testRequestConstraintedGreaterThanExpectedSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
         Set<String> set = getActorsWithLimit( "(objectClass=*)", LdapServer.NO_TIME_LIMIT, 5 );
         assertEquals( 4, set.size() );
     }
@@ -416,9 +416,9 @@ public class SearchLimitsIT extends Abst
     @Test
     public void testRequestObjectScopeAndSizeLimit() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        getLdapServer().setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
 
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( getLdapServer() );
         String filter = "(objectClass=*)";
         SearchControls controls = new SearchControls();
         controls.setTimeLimit( 0 );
@@ -444,7 +444,7 @@ public class SearchLimitsIT extends Abst
      */
     private Set<String> getActorsWithLimit( String filter, int timeLimitMillis, long sizeLimit ) throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( getLdapServer() );
         Set<String> results = new HashSet<String>();
         SearchControls controls = new SearchControls();
         controls.setTimeLimit( timeLimitMillis );
@@ -469,7 +469,7 @@ public class SearchLimitsIT extends Abst
     private Set<String> getActorsWithLimitNonAdmin( String filter, int timeLimitMillis, long sizeLimit ) 
         throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer, "uid=jblack,ou=actors,ou=system", "secret" );
+        DirContext ctx = getWiredContext( getLdapServer(), "uid=jblack,ou=actors,ou=system", "secret" );
         Set<String> results = new HashSet<String>();
         SearchControls controls = new SearchControls();
         controls.setTimeLimit( timeLimitMillis );

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchPerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchPerfIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchPerfIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchPerfIT.java Thu Feb 17 20:23:38 2011
@@ -29,7 +29,6 @@ import org.apache.directory.server.annot
 import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.filter.SearchScope;
@@ -50,18 +49,15 @@ import org.junit.runner.RunWith;
     { @CreateTransport(protocol = "LDAP") })
 public class SearchPerfIT extends AbstractLdapTestUnit
 {
-    public static LdapServer ldapServer;
-
-
     /**
      * test a search request perf.
      */
     @Test
     public void testSearchRequestPerf() throws Exception
     {
-        //ldapServer.getDirectoryService().getInterceptorChain().addFirst( new TimerInterceptor( "Start" ) );
-        //ldapServer.getDirectoryService().getInterceptorChain().addLast( new TimerInterceptor( "End" ) );
-        LdapConnection connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
+        //getLdapServer().getDirectoryService().getInterceptorChain().addFirst( new TimerInterceptor( "Start" ) );
+        //getLdapServer().getDirectoryService().getInterceptorChain().addLast( new TimerInterceptor( "End" ) );
+        LdapConnection connection = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
         connection.setTimeOut( 0 );
 
         try

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsIT.java Thu Feb 17 20:23:38 2011
@@ -95,7 +95,7 @@ public class LdapsIT extends AbstractLda
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( "java.naming.provider.url", "ldap://localhost:" + ldapServer.getPortSSL() + "/ou=system" );
+        env.put( "java.naming.provider.url", "ldap://localhost:" + getLdapServer().getPortSSL() + "/ou=system" );
         env.put( "java.naming.ldap.factory.socket", SSLSocketFactory.class.getName() );
         env.put( "java.naming.security.principal", "uid=admin,ou=system" );
         env.put( "java.naming.security.credentials", "secret" );

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsUpdateCertificateIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsUpdateCertificateIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsUpdateCertificateIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsUpdateCertificateIT.java Thu Feb 17 20:23:38 2011
@@ -96,7 +96,7 @@ public class LdapsUpdateCertificateIT ex
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( "java.naming.provider.url", "ldap://localhost:" + ldapServer.getPortSSL() + "/ou=system" );
+        env.put( "java.naming.provider.url", "ldap://localhost:" + getLdapServer().getPortSSL() + "/ou=system" );
         env.put( "java.naming.ldap.factory.socket", SSLSocketFactory.class.getName() );
         env.put( "java.naming.security.principal", "uid=admin,ou=system" );
         env.put( "java.naming.security.credentials", "secret" );
@@ -114,7 +114,7 @@ public class LdapsUpdateCertificateIT ex
         // create a secure connection
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( "java.naming.provider.url", "ldaps://localhost:" + ldapServer.getPortSSL() );
+        env.put( "java.naming.provider.url", "ldaps://localhost:" + getLdapServer().getPortSSL() );
         env.put( "java.naming.ldap.factory.socket", SSLSocketFactory.class.getName() );
         env.put( "java.naming.security.principal", "uid=admin,ou=system" );
         env.put( "java.naming.security.credentials", "secret" );
@@ -124,7 +124,7 @@ public class LdapsUpdateCertificateIT ex
         // create a new certificate
         String newIssuerDN = "cn=new_issuer_dn";
         String newSubjectDN = "cn=new_subject_dn";
-        Entry entry = ldapServer.getDirectoryService().getAdminSession().lookup(
+        Entry entry = getLdapServer().getDirectoryService().getAdminSession().lookup(
             new Dn( "uid=admin,ou=system" ) );
         TlsKeyGenerator.addKeyPair( entry, newIssuerDN, newSubjectDN, "RSA" );
 
@@ -139,7 +139,7 @@ public class LdapsUpdateCertificateIT ex
         ctx.modifyAttributes( "uid=admin,ou=system", mods );
         ctx.close();
 
-        ldapServer.reloadSslContext();
+        getLdapServer().reloadSslContext();
         
         // create a secure connection
         ctx = new InitialDirContext( env );

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsConfidentialityIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsConfidentialityIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsConfidentialityIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsConfidentialityIT.java Thu Feb 17 20:23:38 2011
@@ -124,7 +124,7 @@ public class StartTlsConfidentialityIT e
         }
         
         ksFile = File.createTempFile( "testStore", "ks" );
-        CoreSession session = ldapServer.getDirectoryService().getAdminSession();
+        CoreSession session = getLdapServer().getDirectoryService().getAdminSession();
         Entry entry = session.lookup( new Dn( "uid=admin,ou=system" ), CERT_IDS );
         byte[] userCertificate = entry.get( CERT_IDS[0] ).getBytes();
         assertNotNull( userCertificate );
@@ -138,7 +138,7 @@ public class StartTlsConfidentialityIT e
         ks.store( new FileOutputStream( ksFile ), "changeit".toCharArray() );
         LOG.debug( "Keystore file installed: {}", ksFile.getAbsolutePath() );
         
-        oldConfidentialityRequiredValue = ldapServer.isConfidentialityRequired();
+        oldConfidentialityRequiredValue = getLdapServer().isConfidentialityRequired();
     }
     
     
@@ -154,7 +154,7 @@ public class StartTlsConfidentialityIT e
         }
         
         LOG.debug( "Keystore file deleted: {}", ksFile.getAbsolutePath() );
-        ldapServer.setConfidentialityRequired( oldConfidentialityRequiredValue );
+        getLdapServer().setConfidentialityRequired( oldConfidentialityRequiredValue );
     }
     
 
@@ -170,7 +170,7 @@ public class StartTlsConfidentialityIT e
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
         
         // Must use the name of the server that is found in its certificate?
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + getLdapServer().getPort() );
 
         // Create initial context
         LOG.debug( "About to get initial context" );
@@ -198,7 +198,7 @@ public class StartTlsConfidentialityIT e
     @Test
     public void testConfidentiality() throws Exception
     {
-        ldapServer.setConfidentialityRequired( true );
+        getLdapServer().setConfidentialityRequired( true );
 
         // -------------------------------------------------------------------
         // Unsecured bind should fail
@@ -206,7 +206,7 @@ public class StartTlsConfidentialityIT e
 
         try
         {
-            ServerIntegrationUtils.getWiredContext( ldapServer );
+            ServerIntegrationUtils.getWiredContext( getLdapServer() );
             fail( "Should not get here due to violation of confidentiality requirements" );
         }
         catch( AuthenticationNotSupportedException e )

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsIT.java Thu Feb 17 20:23:38 2011
@@ -118,7 +118,7 @@ public class StartTlsIT extends Abstract
         }
         
         ksFile = File.createTempFile( "testStore", "ks" );
-        CoreSession session = ldapServer.getDirectoryService().getAdminSession();
+        CoreSession session = getLdapServer().getDirectoryService().getAdminSession();
         Entry entry = session.lookup( new Dn( "uid=admin,ou=system" ), CERT_IDS );
         byte[] userCertificate = entry.get( CERT_IDS[0] ).getBytes();
         assertNotNull( userCertificate );
@@ -132,7 +132,7 @@ public class StartTlsIT extends Abstract
         ks.store( new FileOutputStream( ksFile ), "changeit".toCharArray() );
         LOG.debug( "Keystore file installed: {}", ksFile.getAbsolutePath() );
         
-        oldConfidentialityRequiredValue = ldapServer.isConfidentialityRequired();
+        oldConfidentialityRequiredValue = getLdapServer().isConfidentialityRequired();
     }
     
     
@@ -148,7 +148,7 @@ public class StartTlsIT extends Abstract
         }
         
         LOG.debug( "Keystore file deleted: {}", ksFile.getAbsolutePath() );
-        ldapServer.setConfidentialityRequired( oldConfidentialityRequiredValue );
+        getLdapServer().setConfidentialityRequired( oldConfidentialityRequiredValue );
     }
     
 
@@ -222,7 +222,7 @@ public class StartTlsIT extends Abstract
             env.put( "java.naming.security.authentication", "simple" );
             
             // Must use the name of the server that is found in its certificate?
-            env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
+            env.put( Context.PROVIDER_URL, "ldap://localhost:" + getLdapServer().getPort() );
     
             // Create initial context
             LOG.debug( "About to get initial context" );

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsUpdateCertificateIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsUpdateCertificateIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsUpdateCertificateIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsUpdateCertificateIT.java Thu Feb 17 20:23:38 2011
@@ -114,7 +114,7 @@ public class StartTlsUpdateCertificateIT
         }
         
         ksFile = File.createTempFile( "testStore", "ks" );
-        CoreSession session = ldapServer.getDirectoryService().getAdminSession();
+        CoreSession session = getLdapServer().getDirectoryService().getAdminSession();
         Entry entry = session.lookup( new Dn( "uid=admin,ou=system" ), CERT_IDS );
         byte[] userCertificate = entry.get( CERT_IDS[0] ).getBytes();
         assertNotNull( userCertificate );
@@ -128,7 +128,7 @@ public class StartTlsUpdateCertificateIT
         ks.store( new FileOutputStream( ksFile ), "changeit".toCharArray() );
         LOG.debug( "Keystore file installed: {}", ksFile.getAbsolutePath() );
         
-        oldConfidentialityRequiredValue = ldapServer.isConfidentialityRequired();
+        oldConfidentialityRequiredValue = getLdapServer().isConfidentialityRequired();
     }
     
     
@@ -144,7 +144,7 @@ public class StartTlsUpdateCertificateIT
         }
         
         LOG.debug( "Keystore file deleted: {}", ksFile.getAbsolutePath() );
-        ldapServer.setConfidentialityRequired( oldConfidentialityRequiredValue );
+        getLdapServer().setConfidentialityRequired( oldConfidentialityRequiredValue );
     }
     
 
@@ -157,7 +157,7 @@ public class StartTlsUpdateCertificateIT
         // create a secure connection
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( "java.naming.provider.url", "ldap://localhost:" + ldapServer.getPort() );
+        env.put( "java.naming.provider.url", "ldap://localhost:" + getLdapServer().getPort() );
         env.put( "java.naming.security.principal", "uid=admin,ou=system" );
         env.put( "java.naming.security.credentials", "secret" );
         env.put( "java.naming.security.authentication", "simple" );
@@ -174,7 +174,7 @@ public class StartTlsUpdateCertificateIT
         // create a new certificate
         String newIssuerDN = "cn=new_issuer_dn";
         String newSubjectDN = "cn=new_subject_dn";
-        Entry entry = ldapServer.getDirectoryService().getAdminSession().lookup(
+        Entry entry = getLdapServer().getDirectoryService().getAdminSession().lookup(
             new Dn( "uid=admin,ou=system" ) );
         TlsKeyGenerator.addKeyPair( entry, newIssuerDN, newSubjectDN, "RSA" );
 
@@ -189,7 +189,7 @@ public class StartTlsUpdateCertificateIT
         ctx.modifyAttributes( "uid=admin,ou=system", mods );
         ctx.close();
 
-        ldapServer.reloadSslContext();
+        getLdapServer().reloadSslContext();
         
         // create a new secure connection
         ctx = new InitialLdapContext( env, null );

Modified: directory/apacheds/branches/m1/test-framework/src/main/java/org/apache/directory/server/core/integ/AbstractLdapTestUnit.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/test-framework/src/main/java/org/apache/directory/server/core/integ/AbstractLdapTestUnit.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/test-framework/src/main/java/org/apache/directory/server/core/integ/AbstractLdapTestUnit.java (original)
+++ directory/apacheds/branches/m1/test-framework/src/main/java/org/apache/directory/server/core/integ/AbstractLdapTestUnit.java Thu Feb 17 20:23:38 2011
@@ -36,7 +36,7 @@ public abstract class AbstractLdapTestUn
     private static DirectoryService service;
 
     /** The used LdapServer instance */
-    public static LdapServer ldapServer;
+    private static LdapServer ldapServer;
 
     /** The used KdcServer instance */
     public static KdcServer kdcServer;



Mime
View raw message