public void testSearchCore100kUsers() throws Exception
{
LdapConnection connection = IntegrationUtils.getAdminConnection( getService() );
connection.bind( "uid=admin,ou=system", "secret" );
Entry rootPeople = new DefaultEntry(
connection.getSchemaManager(),
"ou=People,dc=example,dc=com",
"objectClass: top",
"objectClass: organizationalUnit",
"ou: People" );
connection.add( rootPeople );
int nbUsers = 10000;
System.out.println( "Sleeping..." );
//Thread.sleep( 10000 );
long tadd0 = System.currentTimeMillis();
long tadd = tadd0;
for ( int i = 0; i < nbUsers; i++ )
{
Entry user = new DefaultEntry(
connection.getSchemaManager(),
"uid=user." + i + ",ou=People,dc=example,dc=com",
"objectClass: top",
"objectClass: person",
"objectClass: organizationalPerson",