Commit 9838110f authored by Shawn McKinney's avatar Shawn McKinney
Browse files

update moved record (again)

parent 055b76c3
......@@ -31,37 +31,27 @@ public class ModUser extends LoadBase
sampleResult.sampleStart();
User user = new User();
user.setUserId( userId );
boolean isModRdn = false;
Timestamp timestamp = new Timestamp(System.currentTimeMillis());
user.setDescription( "mod once: " + user.getUserId() + ": " + timestamp);
user.setCn( user.getUserId() + "-once");
user.setDisplayName( user.getUserId() + "-once");
write( "threadid: " + getThreadId() + ", userId: " + userId );
User outUser = userImpl.update( user );
assertNotNull( outUser );
if ( modrdn > 0 && count > modrdn && ( count % modrdn ) == 0 )
{
isModRdn = true;
String oldUserId = user.getUserId();
String newUserId = user.getUserId() + "-modrdn";
warn( "MODRDN[" + count + "]: userId: " + user.getUserId() );
// warn( "MODRDN[" + count + "]: old userId: " + user.getUserId() + ", new userId: " + newUserId );
// for( int i = 0; i < 3; i++ )
// {
User outUser = userImpl.modRdn( user, oldUserId );
outUser = userImpl.modRdn( user, oldUserId );
assertNotNull( outUser );
}
Timestamp timestamp = new Timestamp(System.currentTimeMillis());
user.setDescription( "mod once: " + user.getUserId() + ": " + timestamp);
user.setCn( user.getUserId() + "-once");
user.setDisplayName( user.getUserId() + "-once");
write( "threadid: " + getThreadId() + ", userId: " + userId );
User outUser;
if ( isModRdn )
{
user.setDescription( "moved dn: " + user.getUserId() + ": " + timestamp);
outUser = userImpl.update2( user );
}
else
{
outUser = userImpl.update( user );
}
assertNotNull( outUser );
// This tests replication, ability to handle conflicts:
if ( duplicate > 0 && count > duplicate && ( count % duplicate ) == 0 )
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment