You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2022/08/26 16:03:42 UTC
[directory-server] branch master updated (dd68e34fb3 -> a8ccd9045c)
This is an automated email from the ASF dual-hosted git repository.
elecharny pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git
from dd68e34fb3 Merge branch 'master' of https://gitbox.apache.org/repos/asf/directory-server
new 842e474ab3 Moved from JNDI to LDAP API (DIRSERVER-1481)
new a8ccd9045c Merge branch 'master' of https://gitbox.apache.org/repos/asf/directory-server
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../operations/modify/ModifyMVAttributeIT.java | 81 +++++++++++-----------
1 file changed, 41 insertions(+), 40 deletions(-)
[directory-server] 02/02: Merge branch 'master' of https://gitbox.apache.org/repos/asf/directory-server
Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git
commit a8ccd9045cea93dfa1bb0392cc14536e20ce0f40
Merge: 842e474ab3 dd68e34fb3
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Fri Aug 26 18:03:33 2022 +0200
Merge branch 'master' of https://gitbox.apache.org/repos/asf/directory-server
[directory-server] 01/02: Moved from JNDI to LDAP API (DIRSERVER-1481)
Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git
commit 842e474ab355cb7a431312f70f831e64000aa8f3
Merge: 001c2c0ed5 a8ace08eac
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Fri Aug 26 07:46:02 2022 +0200
Moved from JNDI to LDAP API (DIRSERVER-1481)
.../operations/modify/ModifyMVAttributeIT.java | 81 +++++++++++-----------
1 file changed, 41 insertions(+), 40 deletions(-)
diff --cc core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyMVAttributeIT.java
index 94aba14590,94aba14590..fb4dc45405
--- a/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyMVAttributeIT.java
+++ b/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyMVAttributeIT.java
@@@ -19,19 -19,19 +19,17 @@@
*/
package org.apache.directory.server.core.operations.modify;
--import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
--
--import javax.naming.directory.Attribute;
--import javax.naming.directory.Attributes;
--import javax.naming.directory.BasicAttribute;
--import javax.naming.directory.BasicAttributes;
--import javax.naming.directory.DirContext;
--import javax.naming.ldap.LdapContext;
--
++import org.apache.directory.api.ldap.model.entry.Attribute;
++import org.apache.directory.api.ldap.model.entry.DefaultAttribute;
++import org.apache.directory.api.ldap.model.entry.DefaultModification;
++import org.apache.directory.api.ldap.model.entry.Entry;
++import org.apache.directory.api.ldap.model.entry.ModificationOperation;
++import org.apache.directory.ldap.client.api.LdapConnection;
import org.apache.directory.server.core.annotations.ApplyLdifs;
import org.apache.directory.server.core.annotations.CreateDS;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.ApacheDSTestExtension;
++import org.apache.directory.server.core.integ.IntegrationUtils;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
@@@ -64,23 -64,23 +62,24 @@@ public class ModifyMVAttributeIT extend
@Disabled( "Ignore atm, this is a perf test" )
public void testAdd1000Members() throws Exception
{
-- LdapContext sysRoot = getSystemContext( getService() );
--
-- // Add 10000 members
-- Attributes attrs = new BasicAttributes( "uniqueMember", true );
-- Attribute attr = new BasicAttribute( "uniqueMember" );
--
-- for ( int i = 0; i < 10000; i++ )
++ try ( LdapConnection conn = IntegrationUtils.getAdminConnection( getService() ) )
{
-- String newValue = "cn=member" + i + ",ou=people,o=sevenSeas";
-- attr.add( newValue );
++ // Add 10000 members
++ Attribute members = new DefaultAttribute( "uniqueMember" );
++
++ for ( int i = 0; i < 10000; i++ )
++ {
++ String newValue = "cn=member" + i + ",ou=people,o=sevenSeas";
++ members.add( newValue );
++ }
++
++ conn.modify( "cn=testing00,ou=system",
++ new DefaultModification( ModificationOperation.ADD_ATTRIBUTE
++ , members ) );
++
++ Entry entry = conn.lookup( "cn=testing00,ou=system" );
++ System.out.println(" Done, " + entry );
}
--
-- attrs.put( attr );
--
-- sysRoot.modifyAttributes( "cn=testing00", DirContext.ADD_ATTRIBUTE, attrs );
--
-- System.out.println(" Done" );
}
@@@ -91,25 -91,25 +90,27 @@@
@Disabled( "Ignore atm, this is a perf test" )
public void testAdd500Members() throws Exception
{
-- LdapContext sysRoot = getSystemContext( getService() );
-- long t0 = System.currentTimeMillis();
--
-- // Add 600 members
-- for ( int i = 0; i < 100000; i++ )
++ try ( LdapConnection conn = IntegrationUtils.getAdminConnection( getService() ) )
{
-- if ( i% 100 == 0)
++ long t0 = System.currentTimeMillis();
++
++ // Add 500 members
++ for ( int i = 0; i < 500; i++ )
{
-- long t1 = System.currentTimeMillis();
-- long delta = ( t1 - t0 );
-- System.out.println( "Done : " + i + " in " + delta + "ms" );
-- t0 = t1;
++ if ( i% 100 == 0)
++ {
++ long t1 = System.currentTimeMillis();
++ long delta = ( t1 - t0 );
++ System.out.println( "Done : " + i + " in " + delta + "ms" );
++ t0 = t1;
++ }
++
++ conn.modify( "cn=testing00,ou=system",
++ new DefaultModification( ModificationOperation.ADD_ATTRIBUTE
++ , "uniqueMember", "cn=member" + i + ",ou=people,o=sevenSeas" ) );
}
--
-- String newValue = "cn=member" + i + ",ou=people,o=sevenSeas";
-- Attributes attrs = new BasicAttributes( "uniqueMember", newValue, true );
-- sysRoot.modifyAttributes( "cn=testing00", DirContext.ADD_ATTRIBUTE, attrs );
++
++ System.out.println(" Done" );
}
--
-- System.out.println(" Done" );
}
}