You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2019/07/09 14:55:14 UTC

[directory-server] branch master updated: Speed up tests, reduce number of iterations

This is an automated email from the ASF dual-hosted git repository.

seelmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git


The following commit(s) were added to refs/heads/master by this push:
     new 278d52e  Speed up tests, reduce number of iterations
278d52e is described below

commit 278d52e79dc93cfdd5bfe939bb62a6880c268da2
Author: Stefan Seelmann <ma...@stefan-seelmann.de>
AuthorDate: Tue Jul 9 16:52:52 2019 +0200

    Speed up tests, reduce number of iterations
---
 .../operations/search/OperationWithIndexTest.java  |  6 ++---
 .../server/operations/bind/DelegatedAuthIT.java    |  5 ----
 .../operations/modifydn/DIRSERVER_1974_IT.java     | 29 +++++++++++++---------
 3 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java
index 8593459..e88bc34 100644
--- a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java
+++ b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java
@@ -823,7 +823,7 @@ public class OperationWithIndexTest extends AbstractLdapTestUnit
     @Test
     public void testSearchWithIndex() throws Exception
     {
-        int nbIterations = 1000;
+        int nbIterations = 100;
 
         //BufferedWriter out = new BufferedWriter( new FileWriter("/tmp/out.txt") );
 
@@ -868,7 +868,7 @@ public class OperationWithIndexTest extends AbstractLdapTestUnit
 
 
         // Now search the entry from the root
-        EntryCursor cursor = connection.search( "", "(uniqueMember=cn=user784,dc=test,dc=com)", SearchScope.SUBTREE );
+        EntryCursor cursor = connection.search( "", "(uniqueMember=cn=user78,dc=test,dc=com)", SearchScope.SUBTREE );
         List<String> entries = new ArrayList<String>();
 
         while ( cursor.next() )
@@ -883,7 +883,7 @@ public class OperationWithIndexTest extends AbstractLdapTestUnit
         assertNotNull( done );
         assertEquals( ResultCodeEnum.SUCCESS, done.getLdapResult().getResultCode() );
         assertEquals( 1, entries.size() );
-        assertTrue( entries.contains( "cn=user784,dc=test,dc=com" ) );
+        assertTrue( entries.contains( "cn=user78,dc=test,dc=com" ) );
         cursor.close();
     }
 }
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
index 91f67ac..c43afcc 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
@@ -26,7 +26,6 @@ import static org.junit.Assert.fail;
 
 import org.apache.directory.api.ldap.model.exception.LdapAuthenticationException;
 import org.apache.directory.api.util.Network;
-import org.apache.directory.junit.tools.MultiThreadedMultiInvoker;
 import org.apache.directory.ldap.client.api.LdapConnection;
 import org.apache.directory.ldap.client.api.LdapNetworkConnection;
 import org.apache.directory.server.annotations.CreateLdapServer;
@@ -37,7 +36,6 @@ import org.apache.directory.server.core.annotations.CreateDS;
 import org.apache.directory.server.core.authn.DelegatingAuthenticator;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -77,9 +75,6 @@ import org.junit.runner.RunWith;
 public class DelegatedAuthIT extends AbstractLdapTestUnit
 {
 
-    @Rule
-    public MultiThreadedMultiInvoker i = new MultiThreadedMultiInvoker( 1, 1000 );
-
 
     /**
      * Test with bindDn which is not even found under any namingContext of the
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/DIRSERVER_1974_IT.java b/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/DIRSERVER_1974_IT.java
index a74fd17..7f8829f 100755
--- a/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/DIRSERVER_1974_IT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/DIRSERVER_1974_IT.java
@@ -126,6 +126,14 @@ public class DIRSERVER_1974_IT extends AbstractLdapTestUnit
     private static final Logger logger = LoggerFactory.getLogger( DIRSERVER_1974_IT.class );
     private static final String BASE = "dc=example,dc=com";
 
+    /*
+     * Reduce dummy and loop count to speedup test. Original values for reproducing the bug:
+     * DUMMY_COUNT = 1000
+     * LOOP_COUNT = 100
+     */
+    private static final int DUMMY_COUNT = 100;
+    private static final int LOOP_COUNT = 10;
+
     private static final EntryMapper<Entry> DEFAULT_ENTRY_MAPPER = new EntryMapper<Entry>() {
         @Override
         public Entry map( Entry entry ) throws LdapException {
@@ -148,10 +156,9 @@ public class DIRSERVER_1974_IT extends AbstractLdapTestUnit
             "objectClass: organizationalUnit",
             "ou: people" ) );
 
-        // Add 1000 children
-        int dummyCount = 1000;
+        // Add N children
 
-        for ( int i = 0; i < dummyCount; i++ ) 
+        for ( int i = 0; i < DUMMY_COUNT; i++ )
         {
             String dn = "uid=uid-" + i + "," + peopleDn;
             
@@ -175,7 +182,7 @@ public class DIRSERVER_1974_IT extends AbstractLdapTestUnit
         int count = 0;
         
         // Now test the rename
-        for ( int i = 0; i < 100; i++ ) 
+        for ( int i = 0; i < LOOP_COUNT; i++ )
         {
             String oldDnString = "uid=myra-ellen-amos, " + peopleDn.getName();
             String newDnString = "uid=tory-amos, " + peopleDn.getName();
@@ -272,9 +279,8 @@ public class DIRSERVER_1974_IT extends AbstractLdapTestUnit
                                 "objectClass", "organizationalUnit",
                                 "ou", peopleOu ) );
 
-                        int dummyCount = 1000;
-                        logger.debug( "Add {} dummy people", dummyCount );
-                        for ( int i = 1; i < dummyCount; i++ ) 
+                        logger.debug( "Add {} dummy people", DUMMY_COUNT );
+                        for ( int i = 1; i < DUMMY_COUNT; i++ )
                         {
                             String uid = "uid-" + i;
                             String dn = "uid=" + uid + "," + peopleDn;
@@ -297,7 +303,7 @@ public class DIRSERVER_1974_IT extends AbstractLdapTestUnit
             
                 } );
 
-        for ( int i = 0; i < 100; i++ ) {
+        for ( int i = 0; i < LOOP_COUNT; i++ ) {
             logger.info( "round {}", i );
             final String oldUid = "myra-ellen-amos";
             final String oldCn = "Myra Ellen Amos";
@@ -386,9 +392,8 @@ public class DIRSERVER_1974_IT extends AbstractLdapTestUnit
                     "objectClass", "organizationalUnit",
                     "ou", people ) );
 
-            int dummyCount = 1000;
-            logger.debug( "Add {} dummy people", dummyCount );
-            for ( int i = 1; i < dummyCount; i++ ) 
+            logger.debug( "Add {} dummy people", DUMMY_COUNT );
+            for ( int i = 1; i < DUMMY_COUNT; i++ )
             {
                 String uid = "uid-" + i;
                 String dn = "uid=" + uid + "," + dnPeople;
@@ -422,7 +427,7 @@ public class DIRSERVER_1974_IT extends AbstractLdapTestUnit
             
             try
             {
-                for ( ; i < 100; i++ ) 
+                for ( ; i < LOOP_COUNT; i++ )
                 {
                     rename( connection, base, oldDn, oldUid, oldCn, newRdn, newUid, newDn );
                 }


Re: [directory-server] branch master updated: Speed up tests, reduce number of iterations

Posted by Emmanuel Lécharny <el...@gmail.com>.
On 10/07/2019 09:13, Stefan Seelmann wrote:
> On 7/9/19 6:13 PM, Emmanuel Lécharny wrote:
>> On 09/07/2019 17:03, Stefan Seelmann wrote:
>>> Ok, reverted. Let's first see how tests on Jenkins look like, then
>>> ignore if required.
> Seems to be required, inn [1] it failed with timeout twice, once on
> Linux Java 12 and once on Windows Java 8. (Note that on failure there is
> one retry, that's why Linux Java 12 succeeded at the end and Windows
> Java 8 shows another error).
>
>> Okie. We can also rename the class adding a 'Perf' at the end : it will
>> then only be ran when you use the 'perf' profile.
> Good idea, I'd rename to PerfIT.
>
>> Or maybe we should add a special profile for such test ?
> Hm, don't know, too many profiles make the build more complex.


Thanks for the feedback. We are on the same page, Stefan :-)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org


Re: [directory-server] branch master updated: Speed up tests, reduce number of iterations

Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
On 7/9/19 6:13 PM, Emmanuel Lécharny wrote:
> 
> On 09/07/2019 17:03, Stefan Seelmann wrote:
>> Ok, reverted. Let's first see how tests on Jenkins look like, then
>> ignore if required.

Seems to be required, inn [1] it failed with timeout twice, once on
Linux Java 12 and once on Windows Java 8. (Note that on failure there is
one retry, that's why Linux Java 12 succeeded at the end and Windows
Java 8 shows another error).

> Okie. We can also rename the class adding a 'Perf' at the end : it will
> then only be ran when you use the 'perf' profile.

Good idea, I'd rename to PerfIT.

> Or maybe we should add a special profile for such test ?

Hm, don't know, too many profiles make the build more complex.

Kind Regards,
Stefan

[1]
https://builds.apache.org/blue/organizations/jenkins/dir-server-pipeline/detail/dir-server-pipeline/129

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org


Re: [directory-server] branch master updated: Speed up tests, reduce number of iterations

Posted by Emmanuel Lécharny <el...@gmail.com>.
On 09/07/2019 17:03, Stefan Seelmann wrote:
> Ok, reverted. Let's first see how tests on Jenkins look like, then
> ignore if required.


Okie. We can also rename the class adding a 'Perf' at the end : it will 
then only be ran when you use the 'perf' profile.


Or maybe we should add a special profile for such test ?



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org


Re: [directory-server] branch master updated: Speed up tests, reduce number of iterations

Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
Ok, reverted. Let's first see how tests on Jenkins look like, then
ignore if required.

On 7/9/19 5:00 PM, Emmanuel Lécharny wrote:
> Hi Stefan,
> 
> setting the number of loops down to 100 instead of 1000 will make the
> test successful. The idea was to have enough element so that the cache
> would break, and it's only failing when the number of added element grow
> to > 650.
> 
> 
> I suggest we simply @Ignore this test.
> 
> 
> On 09/07/2019 16:55, seelmann@apache.org wrote:
>> This is an automated email from the ASF dual-hosted git repository.
>>
>> seelmann pushed a commit to branch master
>> in repository https://gitbox.apache.org/repos/asf/directory-server.git
>>
>>
>> The following commit(s) were added to refs/heads/master by this push:
>>       new 278d52e  Speed up tests, reduce number of iterations
>> 278d52e is described below
>>
>> commit 278d52e79dc93cfdd5bfe939bb62a6880c268da2
>> Author: Stefan Seelmann <ma...@stefan-seelmann.de>
>> AuthorDate: Tue Jul 9 16:52:52 2019 +0200
>>
>>      Speed up tests, reduce number of iterations
>> ---
>>   .../operations/search/OperationWithIndexTest.java  |  6 ++---
>>   .../server/operations/bind/DelegatedAuthIT.java    |  5 ----
>>   .../operations/modifydn/DIRSERVER_1974_IT.java     | 29
>> +++++++++++++---------
>>   3 files changed, 20 insertions(+), 20 deletions(-)
>>
>> diff --git
>> a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java
>> b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java
>>
>> index 8593459..e88bc34 100644
>> ---
>> a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java
>>
>> +++
>> b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java
>>
>> @@ -823,7 +823,7 @@ public class OperationWithIndexTest extends
>> AbstractLdapTestUnit
>>       @Test
>>       public void testSearchWithIndex() throws Exception
>>       {
>> -        int nbIterations = 1000;
>> +        int nbIterations = 100;
>>             //BufferedWriter out = new BufferedWriter( new
>> FileWriter("/tmp/out.txt") );
>>   @@ -868,7 +868,7 @@ public class OperationWithIndexTest extends
>> AbstractLdapTestUnit
>>               // Now search the entry from the root
>> -        EntryCursor cursor = connection.search( "",
>> "(uniqueMember=cn=user784,dc=test,dc=com)", SearchScope.SUBTREE );
>> +        EntryCursor cursor = connection.search( "",
>> "(uniqueMember=cn=user78,dc=test,dc=com)", SearchScope.SUBTREE );
>>           List<String> entries = new ArrayList<String>();
>>             while ( cursor.next() )
>> @@ -883,7 +883,7 @@ public class OperationWithIndexTest extends
>> AbstractLdapTestUnit
>>           assertNotNull( done );
>>           assertEquals( ResultCodeEnum.SUCCESS,
>> done.getLdapResult().getResultCode() );
>>           assertEquals( 1, entries.size() );
>> -        assertTrue( entries.contains( "cn=user784,dc=test,dc=com" ) );
>> +        assertTrue( entries.contains( "cn=user78,dc=test,dc=com" ) );
>>           cursor.close();
>>       }
>>   }
>> diff --git
>> a/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
>> b/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
>>
>> index 91f67ac..c43afcc 100644
>> ---
>> a/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
>>
>> +++
>> b/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
>>
>> @@ -26,7 +26,6 @@ import static org.junit.Assert.fail;
>>     import
>> org.apache.directory.api.ldap.model.exception.LdapAuthenticationException;
>>
>>   import org.apache.directory.api.util.Network;
>> -import org.apache.directory.junit.tools.MultiThreadedMultiInvoker;
>>   import org.apache.directory.ldap.client.api.LdapConnection;
>>   import org.apache.directory.ldap.client.api.LdapNetworkConnection;
>>   import org.apache.directory.server.annotations.CreateLdapServer;
>> @@ -37,7 +36,6 @@ import
>> org.apache.directory.server.core.annotations.CreateDS;
>>   import org.apache.directory.server.core.authn.DelegatingAuthenticator;
>>   import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
>>   import org.apache.directory.server.core.integ.FrameworkRunner;
>> -import org.junit.Rule;
>>   import org.junit.Test;
>>   import org.junit.runner.RunWith;
>>   @@ -77,9 +75,6 @@ import org.junit.runner.RunWith;
>>   public class DelegatedAuthIT extends AbstractLdapTestUnit
>>   {
>>   -    @Rule
>> -    public MultiThreadedMultiInvoker i = new
>> MultiThreadedMultiInvoker( 1, 1000 );
>> -
>>         /**
>>        * Test with bindDn which is not even found under any
>> namingContext of the
>> diff --git
>> a/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/DIRSERVER_1974_IT.java
>> b/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/DIRSERVER_1974_IT.java
>>
>> index a74fd17..7f8829f 100755
>> ---
>> a/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/DIRSERVER_1974_IT.java
>>
>> +++
>> b/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/DIRSERVER_1974_IT.java
>>
>> @@ -126,6 +126,14 @@ public class DIRSERVER_1974_IT extends
>> AbstractLdapTestUnit
>>       private static final Logger logger = LoggerFactory.getLogger(
>> DIRSERVER_1974_IT.class );
>>       private static final String BASE = "dc=example,dc=com";
>>   +    /*
>> +     * Reduce dummy and loop count to speedup test. Original values
>> for reproducing the bug:
>> +     * DUMMY_COUNT = 1000
>> +     * LOOP_COUNT = 100
>> +     */
>> +    private static final int DUMMY_COUNT = 100;
>> +    private static final int LOOP_COUNT = 10;
>> +
>>       private static final EntryMapper<Entry> DEFAULT_ENTRY_MAPPER =
>> new EntryMapper<Entry>() {
>>           @Override
>>           public Entry map( Entry entry ) throws LdapException {
>> @@ -148,10 +156,9 @@ public class DIRSERVER_1974_IT extends
>> AbstractLdapTestUnit
>>               "objectClass: organizationalUnit",
>>               "ou: people" ) );
>>   -        // Add 1000 children
>> -        int dummyCount = 1000;
>> +        // Add N children
>>   -        for ( int i = 0; i < dummyCount; i++ )
>> +        for ( int i = 0; i < DUMMY_COUNT; i++ )
>>           {
>>               String dn = "uid=uid-" + i + "," + peopleDn;
>>               @@ -175,7 +182,7 @@ public class DIRSERVER_1974_IT
>> extends AbstractLdapTestUnit
>>           int count = 0;
>>                     // Now test the rename
>> -        for ( int i = 0; i < 100; i++ )
>> +        for ( int i = 0; i < LOOP_COUNT; i++ )
>>           {
>>               String oldDnString = "uid=myra-ellen-amos, " +
>> peopleDn.getName();
>>               String newDnString = "uid=tory-amos, " +
>> peopleDn.getName();
>> @@ -272,9 +279,8 @@ public class DIRSERVER_1974_IT extends
>> AbstractLdapTestUnit
>>                                   "objectClass", "organizationalUnit",
>>                                   "ou", peopleOu ) );
>>   -                        int dummyCount = 1000;
>> -                        logger.debug( "Add {} dummy people",
>> dummyCount );
>> -                        for ( int i = 1; i < dummyCount; i++ )
>> +                        logger.debug( "Add {} dummy people",
>> DUMMY_COUNT );
>> +                        for ( int i = 1; i < DUMMY_COUNT; i++ )
>>                           {
>>                               String uid = "uid-" + i;
>>                               String dn = "uid=" + uid + "," + peopleDn;
>> @@ -297,7 +303,7 @@ public class DIRSERVER_1974_IT extends
>> AbstractLdapTestUnit
>>                                 } );
>>   -        for ( int i = 0; i < 100; i++ ) {
>> +        for ( int i = 0; i < LOOP_COUNT; i++ ) {
>>               logger.info( "round {}", i );
>>               final String oldUid = "myra-ellen-amos";
>>               final String oldCn = "Myra Ellen Amos";
>> @@ -386,9 +392,8 @@ public class DIRSERVER_1974_IT extends
>> AbstractLdapTestUnit
>>                       "objectClass", "organizationalUnit",
>>                       "ou", people ) );
>>   -            int dummyCount = 1000;
>> -            logger.debug( "Add {} dummy people", dummyCount );
>> -            for ( int i = 1; i < dummyCount; i++ )
>> +            logger.debug( "Add {} dummy people", DUMMY_COUNT );
>> +            for ( int i = 1; i < DUMMY_COUNT; i++ )
>>               {
>>                   String uid = "uid-" + i;
>>                   String dn = "uid=" + uid + "," + dnPeople;
>> @@ -422,7 +427,7 @@ public class DIRSERVER_1974_IT extends
>> AbstractLdapTestUnit
>>                             try
>>               {
>> -                for ( ; i < 100; i++ )
>> +                for ( ; i < LOOP_COUNT; i++ )
>>                   {
>>                       rename( connection, base, oldDn, oldUid, oldCn,
>> newRdn, newUid, newDn );
>>                   }
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
> For additional commands, e-mail: dev-help@directory.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org


Re: [directory-server] branch master updated: Speed up tests, reduce number of iterations

Posted by Emmanuel Lécharny <el...@gmail.com>.
Hi Stefan,

setting the number of loops down to 100 instead of 1000 will make the 
test successful. The idea was to have enough element so that the cache 
would break, and it's only failing when the number of added element grow 
to > 650.


I suggest we simply @Ignore this test.


On 09/07/2019 16:55, seelmann@apache.org wrote:
> This is an automated email from the ASF dual-hosted git repository.
>
> seelmann pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/directory-server.git
>
>
> The following commit(s) were added to refs/heads/master by this push:
>       new 278d52e  Speed up tests, reduce number of iterations
> 278d52e is described below
>
> commit 278d52e79dc93cfdd5bfe939bb62a6880c268da2
> Author: Stefan Seelmann <ma...@stefan-seelmann.de>
> AuthorDate: Tue Jul 9 16:52:52 2019 +0200
>
>      Speed up tests, reduce number of iterations
> ---
>   .../operations/search/OperationWithIndexTest.java  |  6 ++---
>   .../server/operations/bind/DelegatedAuthIT.java    |  5 ----
>   .../operations/modifydn/DIRSERVER_1974_IT.java     | 29 +++++++++++++---------
>   3 files changed, 20 insertions(+), 20 deletions(-)
>
> diff --git a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java
> index 8593459..e88bc34 100644
> --- a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java
> +++ b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java
> @@ -823,7 +823,7 @@ public class OperationWithIndexTest extends AbstractLdapTestUnit
>       @Test
>       public void testSearchWithIndex() throws Exception
>       {
> -        int nbIterations = 1000;
> +        int nbIterations = 100;
>   
>           //BufferedWriter out = new BufferedWriter( new FileWriter("/tmp/out.txt") );
>   
> @@ -868,7 +868,7 @@ public class OperationWithIndexTest extends AbstractLdapTestUnit
>   
>   
>           // Now search the entry from the root
> -        EntryCursor cursor = connection.search( "", "(uniqueMember=cn=user784,dc=test,dc=com)", SearchScope.SUBTREE );
> +        EntryCursor cursor = connection.search( "", "(uniqueMember=cn=user78,dc=test,dc=com)", SearchScope.SUBTREE );
>           List<String> entries = new ArrayList<String>();
>   
>           while ( cursor.next() )
> @@ -883,7 +883,7 @@ public class OperationWithIndexTest extends AbstractLdapTestUnit
>           assertNotNull( done );
>           assertEquals( ResultCodeEnum.SUCCESS, done.getLdapResult().getResultCode() );
>           assertEquals( 1, entries.size() );
> -        assertTrue( entries.contains( "cn=user784,dc=test,dc=com" ) );
> +        assertTrue( entries.contains( "cn=user78,dc=test,dc=com" ) );
>           cursor.close();
>       }
>   }
> diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
> index 91f67ac..c43afcc 100644
> --- a/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
> +++ b/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
> @@ -26,7 +26,6 @@ import static org.junit.Assert.fail;
>   
>   import org.apache.directory.api.ldap.model.exception.LdapAuthenticationException;
>   import org.apache.directory.api.util.Network;
> -import org.apache.directory.junit.tools.MultiThreadedMultiInvoker;
>   import org.apache.directory.ldap.client.api.LdapConnection;
>   import org.apache.directory.ldap.client.api.LdapNetworkConnection;
>   import org.apache.directory.server.annotations.CreateLdapServer;
> @@ -37,7 +36,6 @@ import org.apache.directory.server.core.annotations.CreateDS;
>   import org.apache.directory.server.core.authn.DelegatingAuthenticator;
>   import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
>   import org.apache.directory.server.core.integ.FrameworkRunner;
> -import org.junit.Rule;
>   import org.junit.Test;
>   import org.junit.runner.RunWith;
>   
> @@ -77,9 +75,6 @@ import org.junit.runner.RunWith;
>   public class DelegatedAuthIT extends AbstractLdapTestUnit
>   {
>   
> -    @Rule
> -    public MultiThreadedMultiInvoker i = new MultiThreadedMultiInvoker( 1, 1000 );
> -
>   
>       /**
>        * Test with bindDn which is not even found under any namingContext of the
> diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/DIRSERVER_1974_IT.java b/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/DIRSERVER_1974_IT.java
> index a74fd17..7f8829f 100755
> --- a/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/DIRSERVER_1974_IT.java
> +++ b/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/DIRSERVER_1974_IT.java
> @@ -126,6 +126,14 @@ public class DIRSERVER_1974_IT extends AbstractLdapTestUnit
>       private static final Logger logger = LoggerFactory.getLogger( DIRSERVER_1974_IT.class );
>       private static final String BASE = "dc=example,dc=com";
>   
> +    /*
> +     * Reduce dummy and loop count to speedup test. Original values for reproducing the bug:
> +     * DUMMY_COUNT = 1000
> +     * LOOP_COUNT = 100
> +     */
> +    private static final int DUMMY_COUNT = 100;
> +    private static final int LOOP_COUNT = 10;
> +
>       private static final EntryMapper<Entry> DEFAULT_ENTRY_MAPPER = new EntryMapper<Entry>() {
>           @Override
>           public Entry map( Entry entry ) throws LdapException {
> @@ -148,10 +156,9 @@ public class DIRSERVER_1974_IT extends AbstractLdapTestUnit
>               "objectClass: organizationalUnit",
>               "ou: people" ) );
>   
> -        // Add 1000 children
> -        int dummyCount = 1000;
> +        // Add N children
>   
> -        for ( int i = 0; i < dummyCount; i++ )
> +        for ( int i = 0; i < DUMMY_COUNT; i++ )
>           {
>               String dn = "uid=uid-" + i + "," + peopleDn;
>               
> @@ -175,7 +182,7 @@ public class DIRSERVER_1974_IT extends AbstractLdapTestUnit
>           int count = 0;
>           
>           // Now test the rename
> -        for ( int i = 0; i < 100; i++ )
> +        for ( int i = 0; i < LOOP_COUNT; i++ )
>           {
>               String oldDnString = "uid=myra-ellen-amos, " + peopleDn.getName();
>               String newDnString = "uid=tory-amos, " + peopleDn.getName();
> @@ -272,9 +279,8 @@ public class DIRSERVER_1974_IT extends AbstractLdapTestUnit
>                                   "objectClass", "organizationalUnit",
>                                   "ou", peopleOu ) );
>   
> -                        int dummyCount = 1000;
> -                        logger.debug( "Add {} dummy people", dummyCount );
> -                        for ( int i = 1; i < dummyCount; i++ )
> +                        logger.debug( "Add {} dummy people", DUMMY_COUNT );
> +                        for ( int i = 1; i < DUMMY_COUNT; i++ )
>                           {
>                               String uid = "uid-" + i;
>                               String dn = "uid=" + uid + "," + peopleDn;
> @@ -297,7 +303,7 @@ public class DIRSERVER_1974_IT extends AbstractLdapTestUnit
>               
>                   } );
>   
> -        for ( int i = 0; i < 100; i++ ) {
> +        for ( int i = 0; i < LOOP_COUNT; i++ ) {
>               logger.info( "round {}", i );
>               final String oldUid = "myra-ellen-amos";
>               final String oldCn = "Myra Ellen Amos";
> @@ -386,9 +392,8 @@ public class DIRSERVER_1974_IT extends AbstractLdapTestUnit
>                       "objectClass", "organizationalUnit",
>                       "ou", people ) );
>   
> -            int dummyCount = 1000;
> -            logger.debug( "Add {} dummy people", dummyCount );
> -            for ( int i = 1; i < dummyCount; i++ )
> +            logger.debug( "Add {} dummy people", DUMMY_COUNT );
> +            for ( int i = 1; i < DUMMY_COUNT; i++ )
>               {
>                   String uid = "uid-" + i;
>                   String dn = "uid=" + uid + "," + dnPeople;
> @@ -422,7 +427,7 @@ public class DIRSERVER_1974_IT extends AbstractLdapTestUnit
>               
>               try
>               {
> -                for ( ; i < 100; i++ )
> +                for ( ; i < LOOP_COUNT; i++ )
>                   {
>                       rename( connection, base, oldDn, oldUid, oldCn, newRdn, newUid, newDn );
>                   }
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org