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

2019-07-10 Thread Emmanuel Lécharny



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-unsubscr...@directory.apache.org
For additional commands, e-mail: dev-h...@directory.apache.org



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

2019-07-10 Thread Stefan Seelmann
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-unsubscr...@directory.apache.org
For additional commands, e-mail: dev-h...@directory.apache.org



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

2019-07-09 Thread Emmanuel Lécharny



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-unsubscr...@directory.apache.org
For additional commands, e-mail: dev-h...@directory.apache.org



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

2019-07-09 Thread Stefan Seelmann
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, seelm...@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 
>> 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 entries = new ArrayList();
>>     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
>> 

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

2019-07-09 Thread Emmanuel Lécharny

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, seelm...@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 
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 entries = new ArrayList();
  
  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