2842N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
2842N/A ! The contents of this file are subject to the terms of the 2842N/A ! Common Development and Distribution License, Version 1.0 only 2842N/A ! (the "License"). You may not use this file except in compliance 2842N/A ! You can obtain a copy of the license at 2842N/A ! See the License for the specific language governing permissions 2842N/A ! and limitations under the License. 2842N/A ! When distributing Covered Code, include this CDDL HEADER in each 2842N/A ! file and include the License file at 2842N/A ! add the following below this CDDL HEADER, with the fields enclosed 2842N/A ! by brackets "[]" replaced with your own identifying information: 2842N/A ! Portions Copyright [yyyy] [name of copyright owner] 2842N/A ! Copyright 2009 Sun Microsystems, Inc. 2842N/A <
defaultcall function="replication_modify"/>
2842N/A <
function name="replication_modify">
2842N/A <
block name="'replication-modify'">
CurrentTestPath['group']='replication'
CurrentTestPath['suite']=STAXCurrentBlock
<
call function="'testSuite_Preamble'"/>
<
import machine="STAF_LOCAL_HOSTNAME" <
call function="'replication_setup'"/>
ldcltLoop = testsDuration / 10
highRange = lowRange + numberOfEntries
jvmLoop = testsDuration / 1800 + 1
baseDN = 'ou=People,%s' % synchroSuffix
masterDir = '%s/..' % masterPath
% (masterDir, numberOfEntries)
% (masterDir, numberOfEntries)
totalEntries = numberOfEntries + 2
<
testcase name="getTestCaseName('Preamble')">
<
call function="'testCase_Preamble'"/>
<!-- Check if 'ldifFile' exists --> <
call function="'GetEntry'">
'location' : masterHost ,
'replication_modify: File %s does not exist, create it' \
'replication_modify: Make a make-ldif template file'
<
call function="'MakeAMakeLdifTemplate'">
'numEntries' : numberOfEntries,
'suffix' : synchroSuffix,
'additionalAttributes' : True,
'templateFile' : ldifTemplate,
'templateLocation' : masterHost
'replication_modify: Make the ldif file'
<
call function="'MakeLdifWithScript'">
'templateFile' : ldifTemplate,
'replication_modify: File %s exists, do nothing' % ldifFile
'replication_modify: Import large ldif file'
<!-- Stop "master" Directory Server --> <
call function="'StopDsWithScript'">
{ 'location' : masterHost,
<!-- Import data into "master" Directory Server --> <
call function="'ImportLdifWithScript'">
{ 'location' : masterHost,
'dsBackEnd' : DIRECTORY_INSTANCE_BE,
returnString = STAXResult[0][1]
<
call function="'checktestString'">
{ 'returnString' : returnString,
'expectedString' : 'Processed %s entries' % totalEntries
'replication_modify: Start DS running on %s:%s' % \
<!-- Start the Directory Server --> <
call function="'StartDsWithScript'">
{ 'location' : masterHost,
<!-- Wait for DS to start --> <
call function="'isAlive'">
{ 'location' : masterHost,
'dsInstanceHost' : masterHost,
'noOfMilliSeconds' : 5000
<!-- Perform the total update --> <
call function="'initializeReplication'">
{ 'location' : clientHost,
'sourceInstanceHost' : masterHost,
'replicationDnList' : [synchroSuffix]
<
call function="'testCase_Postamble'"/>
<
testcase name="getTestCaseName('Run ldclt clients')">
<
call function="'testCase_Preamble'"/>
'replication_modify: Run ldclt modify'
<!--<timer duration="timerDuration"> <
block name="'ldclt-modify-threads'">
'replication_modify: modify threads'
opt1 = '-e delayedstartup=1'
opt2 = '-e rdn=\"uid:user.[RNDN(%s;%s;6)]\"' \
opt3 = '-e attreplace=\"description: random modify XXXXXX\"'
opt4 = '-N %s -I 32 -v -q' % ldcltLoop
opts = '%s %s %s %s' % (opt1, opt2, opt3, opt4)
<
call function="'ldclt'">
{ 'location' : STAF_CLIENT_HOSTNAME,
'dsInstanceHost' : masterHost,
'outputFile' : 'ldclt_modify-%
s.res' % suffix,
<
block name="'ldclt-jvm'">
<
loop from="1" to="jvmLoop" var="loop">
'LOOP %s out of %s' % (loop, jvmLoop)
'replication_modify: save jvm information'
<
call function="'ldapSearchWithScript'">
{ 'location' : masterHost,
'dsInstanceHost' : masterHost,
'dsBaseDN' : 'cn=JVM Memory Usage,cn=monitor',
'dsFilter' : 'objectclass=*',
'expectedRC' : 'noCheck',
'outputFile' : 'jvm_%s_%
s.out' % (suffix, loop),
<
if expr="loop != jvmLoop">
<
call function="'Sleep'">
{ 'sleepForMilliSeconds' : jvmSleep }
<script>timerRC = RC</script> <message>'Timer exceeds %s' % timerDuration</message> <tcstatus result="'fail'"/> (ldcltDir, suffix, STAF_CLIENT_HOSTNAME,
logs.sut, STAXServiceMachine)
<
call function="'copyFile'">
'location' : STAF_CLIENT_HOSTNAME,
'remotehost' : STAXServiceMachine
<
call function="'testCase_Postamble'"/>
<
testcase name="getTestCaseName('Check server is still running')">
<
call function="'testCase_Preamble'"/>
<
paralleliterate var="server" in="_topologyServerList" indexvar="i">
'replication_modify: Check server is still running on \
<!-- Modify entry on one of the servers --> <
call function="'isAlive'">
'noOfMilliSeconds' : 5000
<
call function="'testCase_Postamble'"/>
<
testcase name="getTestCaseName('Verify replication')">
<
call function="'testCase_Preamble'"/>
'replication_modify: Verify replication is still working'
<!-- Verify the replication is still working among the servers in <
call function="'verifyReplication'">
[ _topologyServerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<
testcase name="getTestCaseName('Verify tree synchronization')">
<
call function="'testCase_Preamble'"/>
'replication_modify: Verify the tree synchronization'
<!-- Verify the synchronization of the trees among the servers in <
call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, synchroSuffix ]
<
call function="'testCase_Postamble'"/>
<
testcase name="getTestCaseName('Check replication status')">
<
call function="'testCase_Preamble'"/>
'replication_modify: Check replication status'
<!-- Verify the synchronization of the trees among the servers in <
call function="'getReplicationStatus'">
{ 'location' : masterHost,
'dsInstanceHost' : masterHost,
'replicationDnList' : [synchroSuffix]
<
call function="'testCase_Postamble'"/>
<
import machine="STAF_LOCAL_HOSTNAME" <
call function="'replication_cleanup'">
{ 'suiteSuffix' : suffix }
<
call function="'testSuite_Postamble'"/>