mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

ugaston
22.55.2010 09670254d836e1613803ebd65afe774edbd99b05
Add External Changelog search to replication stress tests
20 files modified
2224 ■■■■■ changed files
opends/tests/staf-tests/shared/ant/build.properties 3 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/functions/environment.xml 9 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/functions/ldap.xml 169 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/functions/tools.xml 47 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/tests/config.py.stubs 1 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/tests/runTestJob.xml 17 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/xsl/id.xsl 90 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/replication/replication.xml 14 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/replication/replication_add_del_add_del_multiple.xml 143 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/replication/replication_add_delete.xml 142 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/replication/replication_add_delete_multiple.xml 143 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/replication/replication_add_mod_delete.xml 143 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/replication/replication_add_mod_delete_search.xml 145 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/replication/replication_add_modify_multiple.xml 143 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/replication/replication_add_search_multiple.xml 144 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/replication/replication_modify.xml 173 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/replication/replication_modify_modifyrdn_multiple.xml 176 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/replication/replication_modify_multiple.xml 174 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/replication/replication_modifyrdn.xml 173 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/replication/replication_modifyrdn_multiple.xml 175 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/ant/build.properties
@@ -117,4 +117,5 @@
logs.uri=file://
tests.os.string=${os.name}
tests.jvm.string=${java.version}(${sun.arch.data.model} bits)
replication.split=false
replication.split=
replication.eclmode=
opends/tests/staf-tests/shared/functions/environment.xml
@@ -202,6 +202,15 @@
        MultimasterSync = 'Multimaster Synchronization'
        MultimasterType = 'multimaster'
        # Replication execution mode variables: if not defined, set random value
        import random
        if REPLICATION_SPLIT_SERVERS == '':
          REPLICATION_SPLIT_SERVERS = random.choice(['true', 'false'])
        if REPLICATION_ECL_MODE == '':
          REPLICATION_ECL_MODE = random.choice(['opends', 'draft'])
        # Create staf objects
        LOCAL_STAF_ROOT  = test_env.staf(STAF_LOCAL_HOSTNAME).root
        REMOTE_STAF_ROOT = test_env.staf(STAF_REMOTE_HOSTNAME).root
opends/tests/staf-tests/shared/functions/ldap.xml
@@ -3228,7 +3228,7 @@
  
  
  
  <!-- Modify an attribute -->
  <!-- Do an ldapsearch using SASL authentication -->
  <function name="saslSearch">
    <function-prolog>
      This function searches the Directory Server using SASL authentication
@@ -3622,4 +3622,171 @@
  </function>
  
  <!-- Read ECL and replay changes on stand-alone server -->
  <function name="eclReadAndPlay">
    <function-prolog>
      This function reads the ECL in a replicated server and replays the changes
      on a stand-alone server
    </function-prolog>
    <function-map-args>
      <function-arg-def name="location"
                        type="optional"
                        default="STAF_REMOTE_HOSTNAME">
        <function-arg-description>
          Location of target host
        </function-arg-description>
        <function-arg-property name="type" value="hostname"/>
      </function-arg-def>
      <function-arg-def name="dsPath"
                        type="optional"
                        default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
        <function-arg-description>
          Pathname to installation root
        </function-arg-description>
        <function-arg-property name="type" value="filepath"/>
      </function-arg-def>
      <function-arg-def name="standaloneHost"
                        type="optional"
                        default="STAF_REMOTE_HOSTNAME">
        <function-arg-description>
          Stand-alone directory server hostname or IP address
        </function-arg-description>
        <function-arg-property name="type" value="hostname"/>
      </function-arg-def>
      <function-arg-def name="standalonePort" type="required">
        <function-arg-description>
          Stand-alone directory server port number
        </function-arg-description>
        <function-arg-property name="type" value="Port number"/>
      </function-arg-def>
      <function-arg-def name="replicaHost1" type="required">
        <function-arg-description>
          Replicated Directory server hostname or IP address
        </function-arg-description>
        <function-arg-property name="type" value="hostname"/>
      </function-arg-def>
      <function-arg-def name="replicaPort1" type="required">
        <function-arg-description>
          Replicated Directory server port number
        </function-arg-description>
        <function-arg-property name="type" value="Port number"/>
      </function-arg-def>
      <function-arg-def name="replicaHost2" type="required">
        <function-arg-description>
          Replicated Directory server hostname or IP address
        </function-arg-description>
        <function-arg-property name="type" value="hostname"/>
      </function-arg-def>
      <function-arg-def name="replicaPort2" type="required">
        <function-arg-description>
          Replicated Directory server port number
        </function-arg-description>
        <function-arg-property name="type" value="Port number"/>
      </function-arg-def>
      <function-arg-def name="bindDn" type="required">
        <function-arg-description>
          Bind DN
        </function-arg-description>
        <function-arg-property name="type" value="DN"/>
      </function-arg-def>
      <function-arg-def name="bindPswd" type="required">
        <function-arg-description>
          Bind password
        </function-arg-description>
        <function-arg-property name="type" value="string"/>
      </function-arg-def>
      <function-arg-def name="eclMode" type="required">
        <function-arg-description>
          ECL search mode: "draft" or "opends"
        </function-arg-description>
        <function-arg-property name="type" value="string"/>
      </function-arg-def>
      <function-arg-def name="queueSize"
                        type="optional"
                        default="1000">
        <function-arg-description>
          Size of the queue where the read updates are stored for the writer to
          replay on the stand-alone server
        </function-arg-description>
        <function-arg-property name="type" value="integer"/>
      </function-arg-def>
      <function-arg-def name="displayMissingChanges"
                        type="optional"
                        default="False">
        <function-arg-description>
          Whether information on missing changes should be displayed or not
        </function-arg-description>
        <function-arg-property name="type" value="boolean"/>
      </function-arg-def>
      <function-arg-def name="outputFilename" type="required">
        <function-arg-description>
          Standard output file name
        </function-arg-description>
        <function-arg-property name="type" value="filepath"/>
      </function-arg-def>
      <function-arg-def name="expectedRC" type="optional" default="0">
        <function-arg-description>
          Expected return code value. Default value is 0
          Wildcard 'noCheck' to not check the RC
        </function-arg-description>
        <function-arg-property name="type" value="integer"/>
      </function-arg-def>
      <function-arg-def name="knownIssue" type="optional" default="None">
        <function-arg-description>
          Known issue. Corresponds to an issue number.
        </function-arg-description>
        <function-arg-property name="type" value="string" />
      </function-arg-def>
    </function-map-args>
    <sequence>
      <!-- Local variables -->
      <script>
        mylocation=location
        #Build the Command
        STAFCmdParamsList=[]
        STAFCmdParams=''
        STAFCmd='EclReadAndPlay'
      </script>
      <!-- Set common ldap arguments -->
      <script>
        STAFCmdParamsList.append('-m %s' % eclMode)
        STAFCmdParamsList.append('-q %s' % queueSize)
        STAFCmdParamsList.append('-D "%s"' % bindDn)
        STAFCmdParamsList.append('-w "%s"' % bindPswd)
        STAFCmdParamsList.append('-s %s:%s' % (standaloneHost, standalonePort))
        STAFCmdParamsList.append('-p %s:%s' % (replicaHost1, replicaPort1))
        STAFCmdParamsList.append('-p %s:%s' % (replicaHost2, replicaPort2))
        STAFCmdParamsList.append('-o %s' % outputFilename)
        if (displayMissingChanges == True):
          displayMC = 'true'
        else:
          displayMC = 'false'
        STAFCmdParamsList.append('-x %s' % displayMC)
        STAFCmdParams=' '.join(STAFCmdParamsList)
        STAFCmd='EclReadAndPlay'
      </script>
      <call function="'runCommand'" >
        { 'name'      : 'Read ECL and replay',
          'command'   : '%s/bin/java' % JAVA_HOME,
          'arguments' : '%s %s' % (STAFCmd,STAFCmdParams),
          'location'  : location,
          'envCmd'    : ['CLASSPATH=%s/../%s/ldapjdk:%s/../%s/ldapjdk/ldapjdk.jar' \
                        % (dsPath,remote.reljavadir,dsPath,remote.reljavadir)],
          'path'      : '%s/../%s/ldapjdk' % (dsPath,remote.reljavadir),
          'expectedRC': expectedRC,
          'knownIssue': knownIssue
        }
      </call>
      <return>
        STAXResult
      </return>
    </sequence>
  </function>
</stax>
opends/tests/staf-tests/shared/functions/tools.xml
@@ -346,6 +346,16 @@
        <function-arg-property name="type" value="filepath"/>
      </function-arg-def>
      
      <function-arg-def name="ignoreAttrsFile"
                        type="optional"
                        default="None">
        <function-arg-description>
          File containing a list of attributes to ignore when computing the
          difference
        </function-arg-description>
        <function-arg-property name="type" value="filepath"/>
      </function-arg-def>
      <function-arg-def name="overwriteExisting" type="optional" default="True">
        <function-arg-description>
          Overwrite existing output file rather than append to it
@@ -391,6 +401,9 @@
        if outputLdif:
          STAFCmdParamsList.append('-o %s' % outputLdif)
        
        if ignoreAttrsFile:
          STAFCmdParamsList.append('-a %s' % ignoreAttrsFile)
        if overwriteExisting:
          STAFCmdParamsList.append('-O')
        
@@ -668,6 +681,15 @@
        <function-arg-property name="type" value="string" />
      </function-arg-def>
      <function-arg-def name="ignoreAttrsFile"
                        type="optional"
                        default="None">
        <function-arg-description>
          File containing a list of attributes to ignore when computing the
          difference
        </function-arg-description>
        <function-arg-property name="type" value="filepath"/>
      </function-arg-def>
    </function-list-args>
    <sequence>
      <script>
@@ -758,11 +780,12 @@
              
              <!-- Compare this tree to the reference one -->
              <call function="'LdifDiffWithScript'">
                { 'location'   : location,
                  'dsPath'     : dsPath,
                  'sourceLdif' : '%s/../%s' % (dsPath, sampleTree),
                  'targetLdif' : '%s/../%s' % (dsPath, referenceTree),
                  'outputLdif' : '%s/../%s' % (dsPath, treeDiffs)
                { 'location'        : location,
                  'dsPath'          : dsPath,
                  'sourceLdif'      : '%s/../%s' % (dsPath, sampleTree),
                  'targetLdif'      : '%s/../%s' % (dsPath, referenceTree),
                  'outputLdif'      : '%s/../%s' % (dsPath, treeDiffs),
                  'ignoreAttrsFile' : ignoreAttrsFile
                }
              </call>
              <if expr="STAXResult != 0">
@@ -2152,7 +2175,6 @@
                  'dsInstancePswd' : otherServer.getRootPwd(),
                  'dsBaseDN'       : entryDn,
                  'dsFilter'       : 'objectclass=*',
                  'dsAttributes'   : 'employeeNumber',
                  'logStderr'      : False
                }                
              </call>
@@ -2210,7 +2232,18 @@
              'issue'      : myKnownIssue
            }
          </call>
          <!-- Remove footprint: delete the entry just added -->
          <call function="'ldapDeleteWithScript'">
            { 'location'       : serverHost,
              'dsPath'         : serverPath,
              'dsInstanceHost' : serverHost,
              'dsInstancePort' : server.getPort(),
              'dsInstanceDn'   : server.getRootDn(),
              'dsInstancePswd' : server.getRootPwd(),
              'dsDn'           : [entryDn]
            }
          </call>
        </sequence>
      </iterate>
      
opends/tests/staf-tests/shared/tests/config.py.stubs
@@ -55,6 +55,7 @@
DIRECTORY_INSTANCE_BE         = 'userRoot'
REPLICATION_CONFIG_DIR        = '${tests.run.dir}/${tests.run.time}/config'
REPLICATION_SPLIT_SERVERS     = '${replication.split}'
REPLICATION_ECL_MODE          = '${replication.eclmode}'
JAVA_HOME                     = '${remote.javahome}'
LOCAL_JAVA_HOME               = '${local.javahome}'
LOGS_ROOT                     = '${tests.run.dir}/${tests.run.time}'
opends/tests/staf-tests/shared/tests/runTestJob.xml
@@ -535,6 +535,23 @@
        
        sutElementList=[]
        
        # Create the sut config element
        sut = doc.createElement("sut")
        id.appendChild(sut)
        for configType in ['REPLICATION_SPLIT_SERVERS','REPLICATION_ECL_MODE']:
          # Create the service testware element
          config = doc.createElement("config")
          config.setAttribute("attribute",configType)
          sut.appendChild(config)
          # Create the service testware elements
          sutElementList=[]
          sutElementList.append(['value',eval(configType)])
          write_text_elements(config,sutElementList)
        # Create the testware element
        testware = doc.createElement("testware")
        id.appendChild(testware)
opends/tests/staf-tests/shared/xsl/id.xsl
@@ -451,6 +451,45 @@
    </xsl:element>
  </xsl:element>
  <!-- Configuration -->
  <xsl:element name="h3">
    <xsl:value-of select="'Configuration Details'"/>
  </xsl:element>
  <!-- Configuration Table-->
  <xsl:element name="table">
    <xsl:attribute name="border">
      <xsl:value-of select="'1'"/>
    </xsl:attribute>
    <xsl:attribute name="cellpadding">
      <xsl:value-of select="'1'"/>
    </xsl:attribute>
    <xsl:element name="tr">
      <xsl:element name="th">
          <xsl:value-of select="'Attribute'"/>
      </xsl:element>
      <xsl:element name="th">
        <xsl:value-of select="'Value'"/>
      </xsl:element>
    </xsl:element>
    <xsl:for-each select="$sut/config">
      <xsl:element name="tr">
        <xsl:element name="td">
          <xsl:element name="b">
            <xsl:value-of select="@attribute"/>
          </xsl:element>
        </xsl:element>
        <xsl:element name="td">
          <xsl:value-of select="value"/>
        </xsl:element>
      </xsl:element>
    </xsl:for-each>
  </xsl:element>
  <xsl:element name="br"/>
  <!-- Package Table -->  
@@ -686,57 +725,6 @@
    </xsl:attribute>
  </xsl:element>
  <!-- Configuration -->
  <xsl:element name="h2">
    <xsl:value-of select="'Configuration Details'"/>
  </xsl:element>
  <!-- Configuration Table-->
  <xsl:element name="table">
    <xsl:attribute name="border">
      <xsl:value-of select="'1'"/>
    </xsl:attribute>
    <xsl:attribute name="cellpadding">
      <xsl:value-of select="'1'"/>
    </xsl:attribute>
    <xsl:element name="tr">
      <xsl:element name="th">
          <xsl:value-of select="'Attribute'"/>
      </xsl:element>
      <xsl:element name="th">
        <xsl:value-of select="'Value'"/>
      </xsl:element>
    </xsl:element>
    <xsl:for-each select="$testware/config">
      <xsl:element name="tr">
        <xsl:element name="td">
          <xsl:element name="b">
            <xsl:value-of select="attribute"/>
          </xsl:element>
        </xsl:element>
        <xsl:element name="td">
          <xsl:value-of select="value"/>
        </xsl:element>
      </xsl:element>
    </xsl:for-each>
  </xsl:element>
  <xsl:element name="br"/>
  <!-- Shaded Line -->
  <xsl:element name="hr">
    <xsl:attribute name="noshade">
      <xsl:value-of select="'noshade'"/>
    </xsl:attribute>
    <xsl:attribute name="size">
      <xsl:value-of select="1"/>
    </xsl:attribute>
  </xsl:element>
  <!-- Additional Information -->
  <xsl:element name="h2">
    <xsl:value-of select="'Additional Information'"/>
opends/tests/staf-tests/stress-tests/testcases/replication/replication.xml
@@ -83,10 +83,22 @@
            
            if (REPLICATION_SPLIT_SERVERS == 'true'):
              globalSplitServers = True
              globalTestExternalChangelog = False
              globalExternalChangelogMode = 'n/a'
            else:
              globalSplitServers = None
              globalSplitServers = None
              globalTestExternalChangelog = True
              globalExternalChangelogMode = REPLICATION_ECL_MODE
          </script>
          <message>
            '***************************************************\n\
            ****  REPLICATION EXECUTION MODES  \n\
            ****  Split Servers: %s  \n\
            ****  External Changelog Mode: %s  \n\
            ***************************************************' % \
            (globalSplitServers, globalExternalChangelogMode)
          </message>
          <iterate var="__test" in="testList">
            <sequence>
opends/tests/staf-tests/stress-tests/testcases/replication/replication_add_del_add_del_multiple.xml
@@ -67,6 +67,7 @@
            server2Dir    = server2.getDir()
            
            suffix        = 'add_del_add_del_multiple'
            consumer      = _topologyServerList[1]
          </script>
@@ -111,6 +112,49 @@
                'templateLocation' : STAF_CLIENT_HOSTNAME
                }
              </call>
              <!-- If the External Changelog is to be tested, install an
               !   stand-alone instance whereto replay the changes -->
              <if expr="globalTestExternalChangelog">
                <sequence>
                  <message>
                    'Test ECL: Install stand-alone instance whereto replay \
                    changes'
                  </message>
                  <!-- Create instance with default parameters read from
                   !   config.py -->
                  <script>
                    standaloneServer = Server(DIRECTORY_INSTANCE_HOST,
                                              DIRECTORY_INSTANCE_DIR,
                                              DIRECTORY_INSTANCE_PORT,
                                              DIRECTORY_INSTANCE_ADMIN_PORT,
                                              DIRECTORY_INSTANCE_SSL_PORT,
                                              None,
                                              DIRECTORY_INSTANCE_DN,
                                              DIRECTORY_INSTANCE_PSWD,
                                              synchroSuffix)
                  </script>
                  <call function="'createInstance'">
                    { 'dsHost'      : standaloneServer.getHostname(),
                      'dsDir'       : standaloneServer.getDir(),
                      'dsPort'      : standaloneServer.getPort(),
                      'dsAdminPort' : standaloneServer.getAdminPort(),
                      'dsSslPort'   : standaloneServer.getSslPort(),
                      'dsJmxPort'   : standaloneServer.getJmxPort(),
                      'dsBindDN'    : standaloneServer.getRootDn(),
                      'dsBindPwd'   : standaloneServer.getRootPwd(),
                      'dsBaseDN'    : standaloneServer.getBaseDn()
                    }
                  </call>
                  <!-- Start the stand-alone Directory Server -->
                  <call function="'StartDsWithScript'">
                    { 'location' : standaloneServer.getHostname() }
                  </call>
                </sequence>
              </if>
              <call function="'testCase_Postamble'"/>
@@ -322,6 +366,38 @@
                      </loop>
                    </sequence>
                    </block>
                    <!-- If the External Changelog is to be tested, install an
                     !   stand-alone instance whereto replay the changes -->
                    <if expr="globalTestExternalChangelog">
                      <block name="'ecl-test'">
                      <sequence>
                        <message>
                          'replication_modify: Test ECL: Read and replay \
                          changes'
                        </message>
                        <call function="'eclReadAndPlay'">
                          { 'location'       : standaloneServer.getHostname(),
                            'standaloneHost' : standaloneServer.getHostname(),
                            'standalonePort' : standaloneServer.getPort(),
                            'replicaHost1'   : consumer.getHostname(),
                            'replicaPort1'   : consumer.getPort(),
                            'replicaHost2'   : masterHost,
                            'replicaPort2'   : master.getPort(),
                            'bindDn'         : master.getRootDn(),
                            'bindPswd'       : master.getRootPwd(),
                            'eclMode'        : globalExternalChangelogMode,
                            'queueSize'      : 1000,
                            'outputFilename' : '%s/eclReadAndPlay.output' \
                                               % standaloneServer.getDir()
                          }
                        </call>
                      </sequence>
                      </block>
                    </if>
                  </parallel>
              <!--</sequence>
              </timer>
@@ -479,7 +555,74 @@
          </testcase>
          
          <!-- If the External Changelog is to be tested, verify the
           !   synchronisation of the tree in the stand-alone instance -->
          <if expr="globalTestExternalChangelog">
            <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                  'replication_modify: Verify the stand-alone server tree \
                  synchronization'
                </message>
                <script>
                  attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \
                                      clientDataDir
                  tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR
                  ignoreAttrs = []
                  ignoreAttrs.append('ds-sync-generation-id')
                  ignoreAttrs.append('ds-sync-hist')
                  ignoreAttrs.append('ds-sync-state')
                  ignoreAttrs.append('createTimestamp')
                  ignoreAttrs.append('modifyTimestamp')
                  # write out the ldif file
                  outfile = open(tmpFile,"w")
          
                  for line in ignoreAttrs:
                    outfile.write("%s\n" % line)
                  outfile.close()
                </script>
                <if expr="clientHost != STAXServiceMachine">
                  <call function="'copyFile'">
                    { 'location'   : masterHost,
                      'srcfile'    : tmpFile,
                      'destfile'   : attrsToIgnoreFile,
                      'remotehost' : clientHost
                    }
                  </call>
                  <else>
                    <script>
                      attrsToIgnoreFile = tmpFile
                    </script>
                  </else>
                </if>
                <!-- Verify the synchronization of the trees among the servers in
                  the topology -->
                <call function="'verifyTrees'">
                  [ clientHost, clientPath, master, [standaloneServer],
                    synchroSuffix, None, attrsToIgnoreFile ]
                </call>
                <!-- Stop the stand-alone Directory Server -->
                <call function="'StopDsWithScript'">
                  { 'location' : standaloneServer.getHostname() }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
          </if>
          
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/>
opends/tests/staf-tests/stress-tests/testcases/replication/replication_add_delete.xml
@@ -61,6 +61,7 @@
            masterDir     = '%s/..' % masterPath
            
            suffix        = 'add_delete'
            consumer      = _topologyServerList[1]
          </script>
@@ -105,6 +106,49 @@
                }
              </call>
              <!-- If the External Changelog is to be tested, install an
               !   stand-alone instance whereto replay the changes -->
              <if expr="globalTestExternalChangelog">
                <sequence>
                  <message>
                    'Test ECL: Install stand-alone instance whereto replay \
                    changes'
                  </message>
                  <!-- Create instance with default parameters read from
                   !   config.py -->
                  <script>
                    standaloneServer = Server(DIRECTORY_INSTANCE_HOST,
                                              DIRECTORY_INSTANCE_DIR,
                                              DIRECTORY_INSTANCE_PORT,
                                              DIRECTORY_INSTANCE_ADMIN_PORT,
                                              DIRECTORY_INSTANCE_SSL_PORT,
                                              None,
                                              DIRECTORY_INSTANCE_DN,
                                              DIRECTORY_INSTANCE_PSWD,
                                              synchroSuffix)
                  </script>
                  <call function="'createInstance'">
                    { 'dsHost'      : standaloneServer.getHostname(),
                      'dsDir'       : standaloneServer.getDir(),
                      'dsPort'      : standaloneServer.getPort(),
                      'dsAdminPort' : standaloneServer.getAdminPort(),
                      'dsSslPort'   : standaloneServer.getSslPort(),
                      'dsJmxPort'   : standaloneServer.getJmxPort(),
                      'dsBindDN'    : standaloneServer.getRootDn(),
                      'dsBindPwd'   : standaloneServer.getRootPwd(),
                      'dsBaseDN'    : standaloneServer.getBaseDn()
                    }
                  </call>
                  <!-- Start the stand-alone Directory Server -->
                  <call function="'StartDsWithScript'">
                    { 'location' : standaloneServer.getHostname() }
                  </call>
                </sequence>
              </if>
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -228,6 +272,38 @@
                      </loop>
                    </sequence>
                    </block>
                    <!-- If the External Changelog is to be tested, install an
                     !   stand-alone instance whereto replay the changes -->
                    <if expr="globalTestExternalChangelog">
                      <block name="'ecl-test'">
                      <sequence>
                        <message>
                          'replication_modify: Test ECL: Read and replay \
                          changes'
                        </message>
                        <call function="'eclReadAndPlay'">
                          { 'location'       : standaloneServer.getHostname(),
                            'standaloneHost' : standaloneServer.getHostname(),
                            'standalonePort' : standaloneServer.getPort(),
                            'replicaHost1'   : consumer.getHostname(),
                            'replicaPort1'   : consumer.getPort(),
                            'replicaHost2'   : masterHost,
                            'replicaPort2'   : master.getPort(),
                            'bindDn'         : master.getRootDn(),
                            'bindPswd'       : master.getRootPwd(),
                            'eclMode'        : globalExternalChangelogMode,
                            'queueSize'      : 1000,
                            'outputFilename' : '%s/eclReadAndPlay.output' \
                                               % standaloneServer.getDir()
                          }
                        </call>
                      </sequence>
                      </block>
                    </if>
                  </parallel>
              <!--</sequence>
              </timer>
@@ -361,8 +437,74 @@
          </testcase>
          
          <!-- If the External Changelog is to be tested, verify the
           !   synchronisation of the tree in the stand-alone instance -->
          <if expr="globalTestExternalChangelog">
            <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                  'replication_modify: Verify the stand-alone server tree \
                  synchronization'
                </message>
                <script>
                  attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \
                                      clientDataDir
                  tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR
                  ignoreAttrs = []
                  ignoreAttrs.append('ds-sync-generation-id')
                  ignoreAttrs.append('ds-sync-hist')
                  ignoreAttrs.append('ds-sync-state')
                  ignoreAttrs.append('createTimestamp')
                  ignoreAttrs.append('modifyTimestamp')
                  # write out the ldif file
                  outfile = open(tmpFile,"w")
          
                  for line in ignoreAttrs:
                    outfile.write("%s\n" % line)
          
                  outfile.close()
                </script>
                <if expr="clientHost != STAXServiceMachine">
                  <call function="'copyFile'">
                    { 'location'   : masterHost,
                      'srcfile'    : tmpFile,
                      'destfile'   : attrsToIgnoreFile,
                      'remotehost' : clientHost
                    }
                  </call>
                  <else>
                    <script>
                      attrsToIgnoreFile = tmpFile
                    </script>
                  </else>
                </if>
                <!-- Verify the synchronization of the trees among the servers in
                  the topology -->
                <call function="'verifyTrees'">
                  [ clientHost, clientPath, master, [standaloneServer],
                    synchroSuffix, None, attrsToIgnoreFile ]
                </call>
                <!-- Stop the stand-alone Directory Server -->
                <call function="'StopDsWithScript'">
                  { 'location' : standaloneServer.getHostname() }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
          </if>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/>
opends/tests/staf-tests/stress-tests/testcases/replication/replication_add_delete_multiple.xml
@@ -67,6 +67,7 @@
            server2Dir    = server2.getDir()
            
            suffix        = 'add_delete_multiple'
            consumer      = _topologyServerList[1]
          </script>
@@ -111,6 +112,49 @@
                'templateLocation' : STAF_CLIENT_HOSTNAME
                }
              </call>
              <!-- If the External Changelog is to be tested, install an
               !   stand-alone instance whereto replay the changes -->
              <if expr="globalTestExternalChangelog">
                <sequence>
                  <message>
                    'Test ECL: Install stand-alone instance whereto replay \
                    changes'
                  </message>
                  <!-- Create instance with default parameters read from
                   !   config.py -->
                  <script>
                    standaloneServer = Server(DIRECTORY_INSTANCE_HOST,
                                              DIRECTORY_INSTANCE_DIR,
                                              DIRECTORY_INSTANCE_PORT,
                                              DIRECTORY_INSTANCE_ADMIN_PORT,
                                              DIRECTORY_INSTANCE_SSL_PORT,
                                              None,
                                              DIRECTORY_INSTANCE_DN,
                                              DIRECTORY_INSTANCE_PSWD,
                                              synchroSuffix)
                  </script>
                  <call function="'createInstance'">
                    { 'dsHost'      : standaloneServer.getHostname(),
                      'dsDir'       : standaloneServer.getDir(),
                      'dsPort'      : standaloneServer.getPort(),
                      'dsAdminPort' : standaloneServer.getAdminPort(),
                      'dsSslPort'   : standaloneServer.getSslPort(),
                      'dsJmxPort'   : standaloneServer.getJmxPort(),
                      'dsBindDN'    : standaloneServer.getRootDn(),
                      'dsBindPwd'   : standaloneServer.getRootPwd(),
                      'dsBaseDN'    : standaloneServer.getBaseDn()
                    }
                  </call>
                  <!-- Start the stand-alone Directory Server -->
                  <call function="'StartDsWithScript'">
                    { 'location' : standaloneServer.getHostname() }
                  </call>
                </sequence>
              </if>
              <call function="'testCase_Postamble'"/>
@@ -254,6 +298,38 @@
                      </loop>
                    </sequence>
                    </block>
                    <!-- If the External Changelog is to be tested, install an
                     !   stand-alone instance whereto replay the changes -->
                    <if expr="globalTestExternalChangelog">
                      <block name="'ecl-test'">
                      <sequence>
                        <message>
                          'replication_modify: Test ECL: Read and replay \
                          changes'
                        </message>
                        <call function="'eclReadAndPlay'">
                          { 'location'       : standaloneServer.getHostname(),
                            'standaloneHost' : standaloneServer.getHostname(),
                            'standalonePort' : standaloneServer.getPort(),
                            'replicaHost1'   : consumer.getHostname(),
                            'replicaPort1'   : consumer.getPort(),
                            'replicaHost2'   : masterHost,
                            'replicaPort2'   : master.getPort(),
                            'bindDn'         : master.getRootDn(),
                            'bindPswd'       : master.getRootPwd(),
                            'eclMode'        : globalExternalChangelogMode,
                            'queueSize'      : 1000,
                            'outputFilename' : '%s/eclReadAndPlay.output' \
                                               % standaloneServer.getDir()
                          }
                        </call>
                      </sequence>
                      </block>
                    </if>
                  </parallel>
              <!--</sequence>
              </timer>
@@ -387,7 +463,74 @@
          </testcase>
          
          <!-- If the External Changelog is to be tested, verify the
           !   synchronisation of the tree in the stand-alone instance -->
          <if expr="globalTestExternalChangelog">
            <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                  'replication_modify: Verify the stand-alone server tree \
                  synchronization'
                </message>
                <script>
                  attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \
                                      clientDataDir
                  tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR
                  ignoreAttrs = []
                  ignoreAttrs.append('ds-sync-generation-id')
                  ignoreAttrs.append('ds-sync-hist')
                  ignoreAttrs.append('ds-sync-state')
                  ignoreAttrs.append('createTimestamp')
                  ignoreAttrs.append('modifyTimestamp')
                  # write out the ldif file
                  outfile = open(tmpFile,"w")
          
                  for line in ignoreAttrs:
                    outfile.write("%s\n" % line)
                  outfile.close()
                </script>
                <if expr="clientHost != STAXServiceMachine">
                  <call function="'copyFile'">
                    { 'location'   : masterHost,
                      'srcfile'    : tmpFile,
                      'destfile'   : attrsToIgnoreFile,
                      'remotehost' : clientHost
                    }
                  </call>
                  <else>
                    <script>
                      attrsToIgnoreFile = tmpFile
                    </script>
                  </else>
                </if>
                <!-- Verify the synchronization of the trees among the servers in
                  the topology -->
                <call function="'verifyTrees'">
                  [ clientHost, clientPath, master, [standaloneServer],
                    synchroSuffix, None, attrsToIgnoreFile ]
                </call>
                <!-- Stop the stand-alone Directory Server -->
                <call function="'StopDsWithScript'">
                  { 'location' : standaloneServer.getHostname() }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
          </if>
          
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/>
opends/tests/staf-tests/stress-tests/testcases/replication/replication_add_mod_delete.xml
@@ -61,6 +61,7 @@
            masterDir     = '%s/..' % masterPath
            
            suffix        = 'add_mod_delete'
            consumer      = _topologyServerList[1]
          </script>
@@ -106,6 +107,49 @@
                }
              </call>
              <!-- If the External Changelog is to be tested, install an
               !   stand-alone instance whereto replay the changes -->
              <if expr="globalTestExternalChangelog">
                <sequence>
                  <message>
                    'Test ECL: Install stand-alone instance whereto replay \
                    changes'
                  </message>
                  <!-- Create instance with default parameters read from
                   !   config.py -->
                  <script>
                    standaloneServer = Server(DIRECTORY_INSTANCE_HOST,
                                              DIRECTORY_INSTANCE_DIR,
                                              DIRECTORY_INSTANCE_PORT,
                                              DIRECTORY_INSTANCE_ADMIN_PORT,
                                              DIRECTORY_INSTANCE_SSL_PORT,
                                              None,
                                              DIRECTORY_INSTANCE_DN,
                                              DIRECTORY_INSTANCE_PSWD,
                                              synchroSuffix)
                  </script>
                  <call function="'createInstance'">
                    { 'dsHost'      : standaloneServer.getHostname(),
                      'dsDir'       : standaloneServer.getDir(),
                      'dsPort'      : standaloneServer.getPort(),
                      'dsAdminPort' : standaloneServer.getAdminPort(),
                      'dsSslPort'   : standaloneServer.getSslPort(),
                      'dsJmxPort'   : standaloneServer.getJmxPort(),
                      'dsBindDN'    : standaloneServer.getRootDn(),
                      'dsBindPwd'   : standaloneServer.getRootPwd(),
                      'dsBaseDN'    : standaloneServer.getBaseDn()
                    }
                  </call>
                  <!-- Start the stand-alone Directory Server -->
                  <call function="'StartDsWithScript'">
                    { 'location' : standaloneServer.getHostname() }
                  </call>
                </sequence>
              </if>
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -265,6 +309,38 @@
                      </loop>
                    </sequence>
                    </block>
                    <!-- If the External Changelog is to be tested, install an
                     !   stand-alone instance whereto replay the changes -->
                    <if expr="globalTestExternalChangelog">
                      <block name="'ecl-test'">
                      <sequence>
                        <message>
                          'replication_modify: Test ECL: Read and replay \
                          changes'
                        </message>
                        <call function="'eclReadAndPlay'">
                          { 'location'       : standaloneServer.getHostname(),
                            'standaloneHost' : standaloneServer.getHostname(),
                            'standalonePort' : standaloneServer.getPort(),
                            'replicaHost1'   : consumer.getHostname(),
                            'replicaPort1'   : consumer.getPort(),
                            'replicaHost2'   : masterHost,
                            'replicaPort2'   : master.getPort(),
                            'bindDn'         : master.getRootDn(),
                            'bindPswd'       : master.getRootPwd(),
                            'eclMode'        : globalExternalChangelogMode,
                            'queueSize'      : 1000,
                            'outputFilename' : '%s/eclReadAndPlay.output' \
                                               % standaloneServer.getDir()
                          }
                        </call>
                      </sequence>
                      </block>
                    </if>
                  </parallel>
              <!--</sequence>
              </timer>
@@ -411,7 +487,74 @@
          </testcase>
          
          <!-- If the External Changelog is to be tested, verify the
           !   synchronisation of the tree in the stand-alone instance -->
          <if expr="globalTestExternalChangelog">
            <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                  'replication_modify: Verify the stand-alone server tree \
                  synchronization'
                </message>
                <script>
                  attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \
                                      clientDataDir
                  tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR
                  ignoreAttrs = []
                  ignoreAttrs.append('ds-sync-generation-id')
                  ignoreAttrs.append('ds-sync-hist')
                  ignoreAttrs.append('ds-sync-state')
                  ignoreAttrs.append('createTimestamp')
                  ignoreAttrs.append('modifyTimestamp')
                  # write out the ldif file
                  outfile = open(tmpFile,"w")
          
                  for line in ignoreAttrs:
                    outfile.write("%s\n" % line)
                  outfile.close()
                </script>
                <if expr="clientHost != STAXServiceMachine">
                  <call function="'copyFile'">
                    { 'location'   : masterHost,
                      'srcfile'    : tmpFile,
                      'destfile'   : attrsToIgnoreFile,
                      'remotehost' : clientHost
                    }
                  </call>
                  <else>
                    <script>
                      attrsToIgnoreFile = tmpFile
                    </script>
                  </else>
                </if>
                <!-- Verify the synchronization of the trees among the servers in
                  the topology -->
                <call function="'verifyTrees'">
                  [ clientHost, clientPath, master, [standaloneServer],
                    synchroSuffix, None, attrsToIgnoreFile ]
                </call>
                <!-- Stop the stand-alone Directory Server -->
                <call function="'StopDsWithScript'">
                  { 'location' : standaloneServer.getHostname() }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
          </if>
          
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/>
opends/tests/staf-tests/stress-tests/testcases/replication/replication_add_mod_delete_search.xml
@@ -61,6 +61,7 @@
            masterDir     = '%s/..' % masterPath
            
            suffix        = 'add_mod_delete_search'
            consumer      = _topologyServerList[1]
          </script>
@@ -106,6 +107,49 @@
                }
              </call>
              <!-- If the External Changelog is to be tested, install an
               !   stand-alone instance whereto replay the changes -->
              <if expr="globalTestExternalChangelog">
                <sequence>
                  <message>
                    'Test ECL: Install stand-alone instance whereto replay \
                    changes'
                  </message>
                  <!-- Create instance with default parameters read from
                   !   config.py -->
                  <script>
                    standaloneServer = Server(DIRECTORY_INSTANCE_HOST,
                                              DIRECTORY_INSTANCE_DIR,
                                              DIRECTORY_INSTANCE_PORT,
                                              DIRECTORY_INSTANCE_ADMIN_PORT,
                                              DIRECTORY_INSTANCE_SSL_PORT,
                                              None,
                                              DIRECTORY_INSTANCE_DN,
                                              DIRECTORY_INSTANCE_PSWD,
                                              synchroSuffix)
                  </script>
                  <call function="'createInstance'">
                    { 'dsHost'      : standaloneServer.getHostname(),
                      'dsDir'       : standaloneServer.getDir(),
                      'dsPort'      : standaloneServer.getPort(),
                      'dsAdminPort' : standaloneServer.getAdminPort(),
                      'dsSslPort'   : standaloneServer.getSslPort(),
                      'dsJmxPort'   : standaloneServer.getJmxPort(),
                      'dsBindDN'    : standaloneServer.getRootDn(),
                      'dsBindPwd'   : standaloneServer.getRootPwd(),
                      'dsBaseDN'    : standaloneServer.getBaseDn()
                    }
                  </call>
                  <!-- Start the stand-alone Directory Server -->
                  <call function="'StartDsWithScript'">
                    { 'location' : standaloneServer.getHostname() }
                  </call>
                </sequence>
              </if>
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -241,7 +285,7 @@
                        opt1 = '-e delayedstartup=1 -r %s -R %s' \
                                % (lowRange, highRange)
                        opt2 = '-e esearch,random -f uid=user.XXXXXX'
                        opt3 = '-N %s -I 32 -v -q' % searchLoop
                        opt3 = '-N %s -I 32 -v -q' % ldcltLoop
                        opts = '%s %s %s' % (opt1, opt2, opt3)
                      </script>
@@ -299,6 +343,38 @@
                      </loop>
                    </sequence>
                    </block>
                    <!-- If the External Changelog is to be tested, install an
                     !   stand-alone instance whereto replay the changes -->
                    <if expr="globalTestExternalChangelog">
                      <block name="'ecl-test'">
                      <sequence>
                        <message>
                          'replication_modify: Test ECL: Read and replay \
                          changes'
                        </message>
                        <call function="'eclReadAndPlay'">
                          { 'location'       : standaloneServer.getHostname(),
                            'standaloneHost' : standaloneServer.getHostname(),
                            'standalonePort' : standaloneServer.getPort(),
                            'replicaHost1'   : consumer.getHostname(),
                            'replicaPort1'   : consumer.getPort(),
                            'replicaHost2'   : masterHost,
                            'replicaPort2'   : master.getPort(),
                            'bindDn'         : master.getRootDn(),
                            'bindPswd'       : master.getRootPwd(),
                            'eclMode'        : globalExternalChangelogMode,
                            'queueSize'      : 1000,
                            'outputFilename' : '%s/eclReadAndPlay.output' \
                                               % standaloneServer.getDir()
                          }
                        </call>
                      </sequence>
                      </block>
                    </if>
                  </parallel>
              <!--</sequence>
              </timer>
@@ -458,7 +534,74 @@
          </testcase>
          
          <!-- If the External Changelog is to be tested, verify the
           !   synchronisation of the tree in the stand-alone instance -->
          <if expr="globalTestExternalChangelog">
            <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                  'replication_modify: Verify the stand-alone server tree \
                  synchronization'
                </message>
                <script>
                  attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \
                                      clientDataDir
                  tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR
                  ignoreAttrs = []
                  ignoreAttrs.append('ds-sync-generation-id')
                  ignoreAttrs.append('ds-sync-hist')
                  ignoreAttrs.append('ds-sync-state')
                  ignoreAttrs.append('createTimestamp')
                  ignoreAttrs.append('modifyTimestamp')
                  # write out the ldif file
                  outfile = open(tmpFile,"w")
          
                  for line in ignoreAttrs:
                    outfile.write("%s\n" % line)
                  outfile.close()
                </script>
                <if expr="clientHost != STAXServiceMachine">
                  <call function="'copyFile'">
                    { 'location'   : masterHost,
                      'srcfile'    : tmpFile,
                      'destfile'   : attrsToIgnoreFile,
                      'remotehost' : clientHost
                    }
                  </call>
                  <else>
                    <script>
                      attrsToIgnoreFile = tmpFile
                    </script>
                  </else>
                </if>
                <!-- Verify the synchronization of the trees among the servers in
                  the topology -->
                <call function="'verifyTrees'">
                  [ clientHost, clientPath, master, [standaloneServer],
                    synchroSuffix, None, attrsToIgnoreFile ]
                </call>
                <!-- Stop the stand-alone Directory Server -->
                <call function="'StopDsWithScript'">
                  { 'location' : standaloneServer.getHostname() }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
          </if>
          
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/>
opends/tests/staf-tests/stress-tests/testcases/replication/replication_add_modify_multiple.xml
@@ -67,6 +67,7 @@
            server2Dir    = server2.getDir()
            
            suffix        = 'add_modify_multiple'
            consumer      = _topologyServerList[1]
          </script>
@@ -112,6 +113,49 @@
                }
              </call>
              <!-- If the External Changelog is to be tested, install an
               !   stand-alone instance whereto replay the changes -->
              <if expr="globalTestExternalChangelog">
                <sequence>
                  <message>
                    'Test ECL: Install stand-alone instance whereto replay \
                    changes'
                  </message>
                  <!-- Create instance with default parameters read from
                   !   config.py -->
                  <script>
                    standaloneServer = Server(DIRECTORY_INSTANCE_HOST,
                                              DIRECTORY_INSTANCE_DIR,
                                              DIRECTORY_INSTANCE_PORT,
                                              DIRECTORY_INSTANCE_ADMIN_PORT,
                                              DIRECTORY_INSTANCE_SSL_PORT,
                                              None,
                                              DIRECTORY_INSTANCE_DN,
                                              DIRECTORY_INSTANCE_PSWD,
                                              synchroSuffix)
                  </script>
                  <call function="'createInstance'">
                    { 'dsHost'      : standaloneServer.getHostname(),
                      'dsDir'       : standaloneServer.getDir(),
                      'dsPort'      : standaloneServer.getPort(),
                      'dsAdminPort' : standaloneServer.getAdminPort(),
                      'dsSslPort'   : standaloneServer.getSslPort(),
                      'dsJmxPort'   : standaloneServer.getJmxPort(),
                      'dsBindDN'    : standaloneServer.getRootDn(),
                      'dsBindPwd'   : standaloneServer.getRootPwd(),
                      'dsBaseDN'    : standaloneServer.getBaseDn()
                    }
                  </call>
                  <!-- Start the stand-alone Directory Server -->
                  <call function="'StartDsWithScript'">
                    { 'location' : standaloneServer.getHostname() }
                  </call>
                </sequence>
              </if>
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -255,6 +299,38 @@
                      </loop>
                    </sequence>
                    </block>
                    <!-- If the External Changelog is to be tested, install an
                     !   stand-alone instance whereto replay the changes -->
                    <if expr="globalTestExternalChangelog">
                      <block name="'ecl-test'">
                      <sequence>
                        <message>
                          'replication_modify: Test ECL: Read and replay \
                          changes'
                        </message>
                        <call function="'eclReadAndPlay'">
                          { 'location'       : standaloneServer.getHostname(),
                            'standaloneHost' : standaloneServer.getHostname(),
                            'standalonePort' : standaloneServer.getPort(),
                            'replicaHost1'   : consumer.getHostname(),
                            'replicaPort1'   : consumer.getPort(),
                            'replicaHost2'   : masterHost,
                            'replicaPort2'   : master.getPort(),
                            'bindDn'         : master.getRootDn(),
                            'bindPswd'       : master.getRootPwd(),
                            'eclMode'        : globalExternalChangelogMode,
                            'queueSize'      : 1000,
                            'outputFilename' : '%s/eclReadAndPlay.output' \
                                               % standaloneServer.getDir()
                          }
                        </call>
                      </sequence>
                      </block>
                    </if>
                  </parallel>
              <!--</sequence>
              </timer>
@@ -388,7 +464,74 @@
          </testcase>
          
          <!-- If the External Changelog is to be tested, verify the
           !   synchronisation of the tree in the stand-alone instance -->
          <if expr="globalTestExternalChangelog">
            <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                  'replication_modify: Verify the stand-alone server tree \
                  synchronization'
                </message>
                <script>
                  attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \
                                      clientDataDir
                  tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR
                  ignoreAttrs = []
                  ignoreAttrs.append('ds-sync-generation-id')
                  ignoreAttrs.append('ds-sync-hist')
                  ignoreAttrs.append('ds-sync-state')
                  ignoreAttrs.append('createTimestamp')
                  ignoreAttrs.append('modifyTimestamp')
                  # write out the ldif file
                  outfile = open(tmpFile,"w")
          
                  for line in ignoreAttrs:
                    outfile.write("%s\n" % line)
                  outfile.close()
                </script>
                <if expr="clientHost != STAXServiceMachine">
                  <call function="'copyFile'">
                    { 'location'   : masterHost,
                      'srcfile'    : tmpFile,
                      'destfile'   : attrsToIgnoreFile,
                      'remotehost' : clientHost
                    }
                  </call>
                  <else>
                    <script>
                      attrsToIgnoreFile = tmpFile
                    </script>
                  </else>
                </if>
                <!-- Verify the synchronization of the trees among the servers in
                  the topology -->
                <call function="'verifyTrees'">
                  [ clientHost, clientPath, master, [standaloneServer],
                    synchroSuffix, None, attrsToIgnoreFile ]
                </call>
                <!-- Stop the stand-alone Directory Server -->
                <call function="'StopDsWithScript'">
                  { 'location' : standaloneServer.getHostname() }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
          </if>
          
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/>
opends/tests/staf-tests/stress-tests/testcases/replication/replication_add_search_multiple.xml
@@ -67,6 +67,8 @@
            server2Dir    = server2.getDir()
            
            suffix        = 'add_search_multiple'
            consumer      = _topologyServerList[1]
          </script>
@@ -112,6 +114,49 @@
                }
              </call>
              <!-- If the External Changelog is to be tested, install an
               !   stand-alone instance whereto replay the changes -->
              <if expr="globalTestExternalChangelog">
                <sequence>
                  <message>
                    'Test ECL: Install stand-alone instance whereto replay \
                    changes'
                  </message>
                  <!-- Create instance with default parameters read from
                   !   config.py -->
                  <script>
                    standaloneServer = Server(DIRECTORY_INSTANCE_HOST,
                                              DIRECTORY_INSTANCE_DIR,
                                              DIRECTORY_INSTANCE_PORT,
                                              DIRECTORY_INSTANCE_ADMIN_PORT,
                                              DIRECTORY_INSTANCE_SSL_PORT,
                                              None,
                                              DIRECTORY_INSTANCE_DN,
                                              DIRECTORY_INSTANCE_PSWD,
                                              synchroSuffix)
                  </script>
                  <call function="'createInstance'">
                    { 'dsHost'      : standaloneServer.getHostname(),
                      'dsDir'       : standaloneServer.getDir(),
                      'dsPort'      : standaloneServer.getPort(),
                      'dsAdminPort' : standaloneServer.getAdminPort(),
                      'dsSslPort'   : standaloneServer.getSslPort(),
                      'dsJmxPort'   : standaloneServer.getJmxPort(),
                      'dsBindDN'    : standaloneServer.getRootDn(),
                      'dsBindPwd'   : standaloneServer.getRootPwd(),
                      'dsBaseDN'    : standaloneServer.getBaseDn()
                    }
                  </call>
                  <!-- Start the stand-alone Directory Server -->
                  <call function="'StartDsWithScript'">
                    { 'location' : standaloneServer.getHostname() }
                  </call>
                </sequence>
              </if>
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -254,6 +299,38 @@
                      </loop>
                    </sequence>
                    </block>
                    <!-- If the External Changelog is to be tested, install an
                     !   stand-alone instance whereto replay the changes -->
                    <if expr="globalTestExternalChangelog">
                      <block name="'ecl-test'">
                      <sequence>
                        <message>
                          'replication_modify: Test ECL: Read and replay \
                          changes'
                        </message>
                        <call function="'eclReadAndPlay'">
                          { 'location'       : standaloneServer.getHostname(),
                            'standaloneHost' : standaloneServer.getHostname(),
                            'standalonePort' : standaloneServer.getPort(),
                            'replicaHost1'   : consumer.getHostname(),
                            'replicaPort1'   : consumer.getPort(),
                            'replicaHost2'   : masterHost,
                            'replicaPort2'   : master.getPort(),
                            'bindDn'         : master.getRootDn(),
                            'bindPswd'       : master.getRootPwd(),
                            'eclMode'        : globalExternalChangelogMode,
                            'queueSize'      : 1000,
                            'outputFilename' : '%s/eclReadAndPlay.output' \
                                               % standaloneServer.getDir()
                          }
                        </call>
                      </sequence>
                      </block>
                    </if>
                  </parallel>
              <!--</sequence>
              </timer>
@@ -387,7 +464,74 @@
          </testcase>
          
          <!-- If the External Changelog is to be tested, verify the
           !   synchronisation of the tree in the stand-alone instance -->
          <if expr="globalTestExternalChangelog">
            <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                  'replication_modify: Verify the stand-alone server tree \
                  synchronization'
                </message>
                <script>
                  attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \
                                      clientDataDir
                  tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR
                  ignoreAttrs = []
                  ignoreAttrs.append('ds-sync-generation-id')
                  ignoreAttrs.append('ds-sync-hist')
                  ignoreAttrs.append('ds-sync-state')
                  ignoreAttrs.append('createTimestamp')
                  ignoreAttrs.append('modifyTimestamp')
                  # write out the ldif file
                  outfile = open(tmpFile,"w")
          
                  for line in ignoreAttrs:
                    outfile.write("%s\n" % line)
                  outfile.close()
                </script>
                <if expr="clientHost != STAXServiceMachine">
                  <call function="'copyFile'">
                    { 'location'   : masterHost,
                      'srcfile'    : tmpFile,
                      'destfile'   : attrsToIgnoreFile,
                      'remotehost' : clientHost
                    }
                  </call>
                  <else>
                    <script>
                      attrsToIgnoreFile = tmpFile
                    </script>
                  </else>
                </if>
                <!-- Verify the synchronization of the trees among the servers in
                  the topology -->
                <call function="'verifyTrees'">
                  [ clientHost, clientPath, master, [standaloneServer],
                    synchroSuffix, None, attrsToIgnoreFile ]
                </call>
                <!-- Stop the stand-alone Directory Server -->
                <call function="'StopDsWithScript'">
                  { 'location' : standaloneServer.getHostname() }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
          </if>
          
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/>
opends/tests/staf-tests/stress-tests/testcases/replication/replication_modify.xml
@@ -65,6 +65,7 @@
            totalEntries = numberOfEntries + 2
            
            suffix       = 'modify'
            consumer     = _topologyServerList[1]
          </script>
          
@@ -192,6 +193,79 @@
                  'replicationDnList'       : [synchroSuffix]
                }
              </call>
              <!-- If the External Changelog is to be tested, install an
               !   stand-alone instance whereto replay the changes -->
              <if expr="globalTestExternalChangelog">
                <sequence>
                  <message>
                    'Test ECL: Install stand-alone instance whereto replay \
                    changes'
                  </message>
                  <!-- Create instance with default parameters read from
                   !   config.py -->
                  <script>
                    standaloneServer = Server(DIRECTORY_INSTANCE_HOST,
                                              DIRECTORY_INSTANCE_DIR,
                                              DIRECTORY_INSTANCE_PORT,
                                              DIRECTORY_INSTANCE_ADMIN_PORT,
                                              DIRECTORY_INSTANCE_SSL_PORT,
                                              None,
                                              DIRECTORY_INSTANCE_DN,
                                              DIRECTORY_INSTANCE_PSWD,
                                              synchroSuffix)
                  </script>
                  <call function="'createInstance'">
                    { 'dsHost'      : standaloneServer.getHostname(),
                      'dsDir'       : standaloneServer.getDir(),
                      'dsPort'      : standaloneServer.getPort(),
                      'dsAdminPort' : standaloneServer.getAdminPort(),
                      'dsSslPort'   : standaloneServer.getSslPort(),
                      'dsJmxPort'   : standaloneServer.getJmxPort(),
                      'dsBindDN'    : standaloneServer.getRootDn(),
                      'dsBindPwd'   : standaloneServer.getRootPwd(),
                      'dsBaseDN'    : standaloneServer.getBaseDn()
                    }
                  </call>
                  <!-- Copy ldif file from "master" -->
                  <script>
                    standaloneLdifFile = '%s/%s_entries.ldif' \
                           % (standaloneServer.getDir(), numberOfEntries)
                  </script>
                  <if expr="masterHost != standaloneServer.getHostname()">
                    <call function="'copyFile'">
                      { 'location'   : masterHost,
                        'srcfile'    : ldifFile,
                        'destfile'   : standaloneLdifFile,
                        'remotehost' : standaloneServer.getHostname()
                      }
                    </call>
                    <else>
                      <script>
                        standaloneLdifFile = ldifFile
                      </script>
                    </else>
                  </if>
                  <!-- Import same data imported into "master"  -->
                  <call function="'ImportLdifWithScript'">
                    { 'location'   : standaloneServer.getHostname(),
                      'dsPath'     : '%s/%s' % \
                                     (standaloneServer.getDir(), OPENDSNAME),
                      'dsBackEnd'  : DIRECTORY_INSTANCE_BE,
                      'dsLdifFile' : standaloneLdifFile
                    }
                  </call>
                  <!-- Start the stand-alone Directory Server -->
                  <call function="'StartDsWithScript'">
                    { 'location' : standaloneServer.getHostname() }
                  </call>
                </sequence>
              </if>
              <call function="'testCase_Postamble'"/>
@@ -282,6 +356,38 @@
                      </loop>
                    </sequence>
                    </block>
                    <!-- If the External Changelog is to be tested, install an
                     !   stand-alone instance whereto replay the changes -->
                    <if expr="globalTestExternalChangelog">
                      <block name="'ecl-test'">
                      <sequence>
                        <message>
                          'replication_modify: Test ECL: Read and replay \
                          changes'
                        </message>
                        <call function="'eclReadAndPlay'">
                          { 'location'       : standaloneServer.getHostname(),
                            'standaloneHost' : standaloneServer.getHostname(),
                            'standalonePort' : standaloneServer.getPort(),
                            'replicaHost1'   : consumer.getHostname(),
                            'replicaPort1'   : consumer.getPort(),
                            'replicaHost2'   : masterHost,
                            'replicaPort2'   : master.getPort(),
                            'bindDn'         : master.getRootDn(),
                            'bindPswd'       : master.getRootPwd(),
                            'eclMode'        : globalExternalChangelogMode,
                            'queueSize'      : 1000,
                            'outputFilename' : '%s/eclReadAndPlay.output' \
                                               % standaloneServer.getDir()
                          }
                        </call>
                      </sequence>
                      </block>
                    </if>
                  </parallel>
              <!--</sequence>
              </timer>
@@ -400,8 +506,75 @@
            </sequence>
          </testcase>
          <!-- If the External Changelog is to be tested, verify the
           !   synchronisation of the tree in the stand-alone instance -->
          <if expr="globalTestExternalChangelog">
            <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                  'replication_modify: Verify the stand-alone server tree \
                  synchronization'
                </message>
                <script>
                  attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \
                                      clientDataDir
                  tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR
                  ignoreAttrs = []
                  ignoreAttrs.append('ds-sync-generation-id')
                  ignoreAttrs.append('ds-sync-hist')
                  ignoreAttrs.append('ds-sync-state')
                  ignoreAttrs.append('createTimestamp')
                  ignoreAttrs.append('modifyTimestamp')
                  # write out the ldif file
                  outfile = open(tmpFile,"w")
          
                  for line in ignoreAttrs:
                    outfile.write("%s\n" % line)
          
                  outfile.close()
                </script>
                <if expr="clientHost != STAXServiceMachine">
                  <call function="'copyFile'">
                    { 'location'   : masterHost,
                      'srcfile'    : tmpFile,
                      'destfile'   : attrsToIgnoreFile,
                      'remotehost' : clientHost
                    }
                  </call>
                  <else>
                    <script>
                      attrsToIgnoreFile = tmpFile
                    </script>
                  </else>
                </if>
                <!-- Verify the synchronization of the trees among the servers in
                  the topology -->
                <call function="'verifyTrees'">
                  [ clientHost, clientPath, master, [standaloneServer],
                    synchroSuffix, None, attrsToIgnoreFile ]
                </call>
                <!-- Stop the stand-alone Directory Server -->
                <call function="'StopDsWithScript'">
                  { 'location' : standaloneServer.getHostname() }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
          </if>
          
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/>
opends/tests/staf-tests/stress-tests/testcases/replication/replication_modify_modifyrdn_multiple.xml
@@ -70,7 +70,9 @@
                            % (server1Dir, numberOfEntries)
            totalEntries  = numberOfEntries + 2
            
            suffix        = 'modify_modifyrdn_multiple'
            suffix        = 'modify_modifyrdn_multiple'
            consumer      = _topologyServerList[1]
          </script>
@@ -199,6 +201,79 @@
                }
              </call>
              <!-- If the External Changelog is to be tested, install an
               !   stand-alone instance whereto replay the changes -->
              <if expr="globalTestExternalChangelog">
                <sequence>
                  <message>
                    'Test ECL: Install stand-alone instance whereto replay \
                    changes'
                  </message>
                  <!-- Create instance with default parameters read from
                   !   config.py -->
                  <script>
                    standaloneServer = Server(DIRECTORY_INSTANCE_HOST,
                                              DIRECTORY_INSTANCE_DIR,
                                              DIRECTORY_INSTANCE_PORT,
                                              DIRECTORY_INSTANCE_ADMIN_PORT,
                                              DIRECTORY_INSTANCE_SSL_PORT,
                                              None,
                                              DIRECTORY_INSTANCE_DN,
                                              DIRECTORY_INSTANCE_PSWD,
                                              synchroSuffix)
                  </script>
                  <call function="'createInstance'">
                    { 'dsHost'      : standaloneServer.getHostname(),
                      'dsDir'       : standaloneServer.getDir(),
                      'dsPort'      : standaloneServer.getPort(),
                      'dsAdminPort' : standaloneServer.getAdminPort(),
                      'dsSslPort'   : standaloneServer.getSslPort(),
                      'dsJmxPort'   : standaloneServer.getJmxPort(),
                      'dsBindDN'    : standaloneServer.getRootDn(),
                      'dsBindPwd'   : standaloneServer.getRootPwd(),
                      'dsBaseDN'    : standaloneServer.getBaseDn()
                    }
                  </call>
                  <!-- Copy ldif file from "master" -->
                  <script>
                    standaloneLdifFile = '%s/%s_entries.ldif' \
                           % (standaloneServer.getDir(), numberOfEntries)
                  </script>
                  <if expr="masterHost != standaloneServer.getHostname()">
                    <call function="'copyFile'">
                      { 'location'   : masterHost,
                        'srcfile'    : ldifFile,
                        'destfile'   : standaloneLdifFile,
                        'remotehost' : standaloneServer.getHostname()
                      }
                    </call>
                    <else>
                      <script>
                        standaloneLdifFile = ldifFile
                      </script>
                    </else>
                  </if>
                  <!-- Import same data imported into "master"  -->
                  <call function="'ImportLdifWithScript'">
                    { 'location'   : standaloneServer.getHostname(),
                      'dsPath'     : '%s/%s' % \
                                     (standaloneServer.getDir(), OPENDSNAME),
                      'dsBackEnd'  : DIRECTORY_INSTANCE_BE,
                      'dsLdifFile' : standaloneLdifFile
                    }
                  </call>
                  <!-- Start the stand-alone Directory Server -->
                  <call function="'StartDsWithScript'">
                    { 'location' : standaloneServer.getHostname() }
                  </call>
                </sequence>
              </if>
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -337,6 +412,38 @@
                      </loop>
                    </sequence>
                    </block>
                    <!-- If the External Changelog is to be tested, install an
                     !   stand-alone instance whereto replay the changes -->
                    <if expr="globalTestExternalChangelog">
                      <block name="'ecl-test'">
                      <sequence>
                        <message>
                          'replication_modify: Test ECL: Read and replay \
                          changes'
                        </message>
                        <call function="'eclReadAndPlay'">
                          { 'location'       : standaloneServer.getHostname(),
                            'standaloneHost' : standaloneServer.getHostname(),
                            'standalonePort' : standaloneServer.getPort(),
                            'replicaHost1'   : consumer.getHostname(),
                            'replicaPort1'   : consumer.getPort(),
                            'replicaHost2'   : masterHost,
                            'replicaPort2'   : master.getPort(),
                            'bindDn'         : master.getRootDn(),
                            'bindPswd'       : master.getRootPwd(),
                            'eclMode'        : globalExternalChangelogMode,
                            'queueSize'      : 1000,
                            'outputFilename' : '%s/eclReadAndPlay.output' \
                                               % standaloneServer.getDir()
                          }
                        </call>
                      </sequence>
                      </block>
                    </if>
                  </parallel>
              <!--</sequence>
              </timer>
@@ -470,7 +577,74 @@
          </testcase>
          
          <!-- If the External Changelog is to be tested, verify the
           !   synchronisation of the tree in the stand-alone instance -->
          <if expr="globalTestExternalChangelog">
            <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                  'replication_modify: Verify the stand-alone server tree \
                  synchronization'
                </message>
                <script>
                  attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \
                                      clientDataDir
                  tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR
                  ignoreAttrs = []
                  ignoreAttrs.append('ds-sync-generation-id')
                  ignoreAttrs.append('ds-sync-hist')
                  ignoreAttrs.append('ds-sync-state')
                  ignoreAttrs.append('createTimestamp')
                  ignoreAttrs.append('modifyTimestamp')
                  # write out the ldif file
                  outfile = open(tmpFile,"w")
          
                  for line in ignoreAttrs:
                    outfile.write("%s\n" % line)
                  outfile.close()
                </script>
                <if expr="clientHost != STAXServiceMachine">
                  <call function="'copyFile'">
                    { 'location'   : masterHost,
                      'srcfile'    : tmpFile,
                      'destfile'   : attrsToIgnoreFile,
                      'remotehost' : clientHost
                    }
                  </call>
                  <else>
                    <script>
                      attrsToIgnoreFile = tmpFile
                    </script>
                  </else>
                </if>
                <!-- Verify the synchronization of the trees among the servers in
                  the topology -->
                <call function="'verifyTrees'">
                  [ clientHost, clientPath, master, [standaloneServer],
                    synchroSuffix, None, attrsToIgnoreFile ]
                </call>
                <!-- Stop the stand-alone Directory Server -->
                <call function="'StopDsWithScript'">
                  { 'location' : standaloneServer.getHostname() }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
          </if>
          
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/>
opends/tests/staf-tests/stress-tests/testcases/replication/replication_modify_multiple.xml
@@ -71,6 +71,8 @@
            totalEntries  = numberOfEntries + 2
            
            suffix        = 'modify_multiple'
            consumer      = _topologyServerList[1]
          </script>
@@ -199,6 +201,79 @@
                }
              </call>
              <!-- If the External Changelog is to be tested, install an
               !   stand-alone instance whereto replay the changes -->
              <if expr="globalTestExternalChangelog">
                <sequence>
                  <message>
                    'Test ECL: Install stand-alone instance whereto replay \
                    changes'
                  </message>
                  <!-- Create instance with default parameters read from
                   !   config.py -->
                  <script>
                    standaloneServer = Server(DIRECTORY_INSTANCE_HOST,
                                              DIRECTORY_INSTANCE_DIR,
                                              DIRECTORY_INSTANCE_PORT,
                                              DIRECTORY_INSTANCE_ADMIN_PORT,
                                              DIRECTORY_INSTANCE_SSL_PORT,
                                              None,
                                              DIRECTORY_INSTANCE_DN,
                                              DIRECTORY_INSTANCE_PSWD,
                                              synchroSuffix)
                  </script>
                  <call function="'createInstance'">
                    { 'dsHost'      : standaloneServer.getHostname(),
                      'dsDir'       : standaloneServer.getDir(),
                      'dsPort'      : standaloneServer.getPort(),
                      'dsAdminPort' : standaloneServer.getAdminPort(),
                      'dsSslPort'   : standaloneServer.getSslPort(),
                      'dsJmxPort'   : standaloneServer.getJmxPort(),
                      'dsBindDN'    : standaloneServer.getRootDn(),
                      'dsBindPwd'   : standaloneServer.getRootPwd(),
                      'dsBaseDN'    : standaloneServer.getBaseDn()
                    }
                  </call>
                  <!-- Copy ldif file from "master" -->
                  <script>
                    standaloneLdifFile = '%s/%s_entries.ldif' \
                           % (standaloneServer.getDir(), numberOfEntries)
                  </script>
                  <if expr="masterHost != standaloneServer.getHostname()">
                    <call function="'copyFile'">
                      { 'location'   : masterHost,
                        'srcfile'    : ldifFile,
                        'destfile'   : standaloneLdifFile,
                        'remotehost' : standaloneServer.getHostname()
                      }
                    </call>
                    <else>
                      <script>
                        standaloneLdifFile = ldifFile
                      </script>
                    </else>
                  </if>
                  <!-- Import same data imported into "master"  -->
                  <call function="'ImportLdifWithScript'">
                    { 'location'   : standaloneServer.getHostname(),
                      'dsPath'     : '%s/%s' % \
                                     (standaloneServer.getDir(), OPENDSNAME),
                      'dsBackEnd'  : DIRECTORY_INSTANCE_BE,
                      'dsLdifFile' : standaloneLdifFile
                    }
                  </call>
                  <!-- Start the stand-alone Directory Server -->
                  <call function="'StartDsWithScript'">
                    { 'location' : standaloneServer.getHostname() }
                  </call>
                </sequence>
              </if>
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -337,6 +412,38 @@
                      </loop>
                    </sequence>
                    </block>
                    <!-- If the External Changelog is to be tested, install an
                     !   stand-alone instance whereto replay the changes -->
                    <if expr="globalTestExternalChangelog">
                      <block name="'ecl-test'">
                      <sequence>
                        <message>
                          'replication_modify: Test ECL: Read and replay \
                          changes'
                        </message>
                        <call function="'eclReadAndPlay'">
                          { 'location'       : standaloneServer.getHostname(),
                            'standaloneHost' : standaloneServer.getHostname(),
                            'standalonePort' : standaloneServer.getPort(),
                            'replicaHost1'   : consumer.getHostname(),
                            'replicaPort1'   : consumer.getPort(),
                            'replicaHost2'   : masterHost,
                            'replicaPort2'   : master.getPort(),
                            'bindDn'         : master.getRootDn(),
                            'bindPswd'       : master.getRootPwd(),
                            'eclMode'        : globalExternalChangelogMode,
                            'queueSize'      : 1000,
                            'outputFilename' : '%s/eclReadAndPlay.output' \
                                               % standaloneServer.getDir()
                          }
                        </call>
                      </sequence>
                      </block>
                    </if>
                  </parallel>
              <!--</sequence>
              </timer>
@@ -470,7 +577,74 @@
          </testcase>
          
          <!-- If the External Changelog is to be tested, verify the
           !   synchronisation of the tree in the stand-alone instance -->
          <if expr="globalTestExternalChangelog">
            <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                  'replication_modify: Verify the stand-alone server tree \
                  synchronization'
                </message>
                <script>
                  attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \
                                      clientDataDir
                  tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR
                  ignoreAttrs = []
                  ignoreAttrs.append('ds-sync-generation-id')
                  ignoreAttrs.append('ds-sync-hist')
                  ignoreAttrs.append('ds-sync-state')
                  ignoreAttrs.append('createTimestamp')
                  ignoreAttrs.append('modifyTimestamp')
                  # write out the ldif file
                  outfile = open(tmpFile,"w")
          
                  for line in ignoreAttrs:
                    outfile.write("%s\n" % line)
                  outfile.close()
                </script>
                <if expr="clientHost != STAXServiceMachine">
                  <call function="'copyFile'">
                    { 'location'   : masterHost,
                      'srcfile'    : tmpFile,
                      'destfile'   : attrsToIgnoreFile,
                      'remotehost' : clientHost
                    }
                  </call>
                  <else>
                    <script>
                      attrsToIgnoreFile = tmpFile
                    </script>
                  </else>
                </if>
                <!-- Verify the synchronization of the trees among the servers in
                  the topology -->
                <call function="'verifyTrees'">
                  [ clientHost, clientPath, master, [standaloneServer],
                    synchroSuffix, None, attrsToIgnoreFile ]
                </call>
                <!-- Stop the stand-alone Directory Server -->
                <call function="'StopDsWithScript'">
                  { 'location' : standaloneServer.getHostname() }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
          </if>
          
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/>
opends/tests/staf-tests/stress-tests/testcases/replication/replication_modifyrdn.xml
@@ -65,6 +65,7 @@
            totalEntries  = numberOfEntries + 2
            
            suffix        = 'modifyrdn'
            consumer      = _topologyServerList[1]
          </script>
          
@@ -194,6 +195,79 @@
                }
              </call>
              <!-- If the External Changelog is to be tested, install an
               !   stand-alone instance whereto replay the changes -->
              <if expr="globalTestExternalChangelog">
                <sequence>
                  <message>
                    'Test ECL: Install stand-alone instance whereto replay \
                    changes'
                  </message>
                  <!-- Create instance with default parameters read from
                   !   config.py -->
                  <script>
                    standaloneServer = Server(DIRECTORY_INSTANCE_HOST,
                                              DIRECTORY_INSTANCE_DIR,
                                              DIRECTORY_INSTANCE_PORT,
                                              DIRECTORY_INSTANCE_ADMIN_PORT,
                                              DIRECTORY_INSTANCE_SSL_PORT,
                                              None,
                                              DIRECTORY_INSTANCE_DN,
                                              DIRECTORY_INSTANCE_PSWD,
                                              synchroSuffix)
                  </script>
                  <call function="'createInstance'">
                    { 'dsHost'      : standaloneServer.getHostname(),
                      'dsDir'       : standaloneServer.getDir(),
                      'dsPort'      : standaloneServer.getPort(),
                      'dsAdminPort' : standaloneServer.getAdminPort(),
                      'dsSslPort'   : standaloneServer.getSslPort(),
                      'dsJmxPort'   : standaloneServer.getJmxPort(),
                      'dsBindDN'    : standaloneServer.getRootDn(),
                      'dsBindPwd'   : standaloneServer.getRootPwd(),
                      'dsBaseDN'    : standaloneServer.getBaseDn()
                    }
                  </call>
                  <!-- Copy ldif file from "master" -->
                  <script>
                    standaloneLdifFile = '%s/%s_entries.ldif' \
                           % (standaloneServer.getDir(), numberOfEntries)
                  </script>
                  <if expr="masterHost != standaloneServer.getHostname()">
                    <call function="'copyFile'">
                      { 'location'   : masterHost,
                        'srcfile'    : ldifFile,
                        'destfile'   : standaloneLdifFile,
                        'remotehost' : standaloneServer.getHostname()
                      }
                    </call>
                    <else>
                      <script>
                        standaloneLdifFile = ldifFile
                      </script>
                    </else>
                  </if>
                  <!-- Import same data imported into "master"  -->
                  <call function="'ImportLdifWithScript'">
                    { 'location'   : standaloneServer.getHostname(),
                      'dsPath'     : '%s/%s' % \
                                     (standaloneServer.getDir(), OPENDSNAME),
                      'dsBackEnd'  : DIRECTORY_INSTANCE_BE,
                      'dsLdifFile' : standaloneLdifFile
                    }
                  </call>
                  <!-- Start the stand-alone Directory Server -->
                  <call function="'StartDsWithScript'">
                    { 'location' : standaloneServer.getHostname() }
                  </call>
                </sequence>
              </if>
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -282,6 +356,38 @@
                      </loop>
                    </sequence>
                    </block>
                    <!-- If the External Changelog is to be tested, install an
                     !   stand-alone instance whereto replay the changes -->
                    <if expr="globalTestExternalChangelog">
                      <block name="'ecl-test'">
                      <sequence>
                        <message>
                          'replication_modify: Test ECL: Read and replay \
                          changes'
                        </message>
                        <call function="'eclReadAndPlay'">
                          { 'location'       : standaloneServer.getHostname(),
                            'standaloneHost' : standaloneServer.getHostname(),
                            'standalonePort' : standaloneServer.getPort(),
                            'replicaHost1'   : consumer.getHostname(),
                            'replicaPort1'   : consumer.getPort(),
                            'replicaHost2'   : masterHost,
                            'replicaPort2'   : master.getPort(),
                            'bindDn'         : master.getRootDn(),
                            'bindPswd'       : master.getRootPwd(),
                            'eclMode'        : globalExternalChangelogMode,
                            'queueSize'      : 1000,
                            'outputFilename' : '%s/eclReadAndPlay.output' \
                                               % standaloneServer.getDir()
                          }
                        </call>
                      </sequence>
                      </block>
                    </if>
                  </parallel>
              <!--</sequence>
              </timer>
@@ -401,7 +507,74 @@
          </testcase>
          
          <!-- If the External Changelog is to be tested, verify the
           !   synchronisation of the tree in the stand-alone instance -->
          <if expr="globalTestExternalChangelog">
            <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                  'replication_modify: Verify the stand-alone server tree \
                  synchronization'
                </message>
                <script>
                  attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \
                                      clientDataDir
                  tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR
                  ignoreAttrs = []
                  ignoreAttrs.append('ds-sync-generation-id')
                  ignoreAttrs.append('ds-sync-hist')
                  ignoreAttrs.append('ds-sync-state')
                  ignoreAttrs.append('createTimestamp')
                  ignoreAttrs.append('modifyTimestamp')
                  # write out the ldif file
                  outfile = open(tmpFile,"w")
          
                  for line in ignoreAttrs:
                    outfile.write("%s\n" % line)
                  outfile.close()
                </script>
                <if expr="clientHost != STAXServiceMachine">
                  <call function="'copyFile'">
                    { 'location'   : masterHost,
                      'srcfile'    : tmpFile,
                      'destfile'   : attrsToIgnoreFile,
                      'remotehost' : clientHost
                    }
                  </call>
                  <else>
                    <script>
                      attrsToIgnoreFile = tmpFile
                    </script>
                  </else>
                </if>
                <!-- Verify the synchronization of the trees among the servers in
                  the topology -->
                <call function="'verifyTrees'">
                  [ clientHost, clientPath, master, [standaloneServer],
                    synchroSuffix, None, attrsToIgnoreFile ]
                </call>
                <!-- Stop the stand-alone Directory Server -->
                <call function="'StopDsWithScript'">
                  { 'location' : standaloneServer.getHostname() }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
          </if>
          
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/>
opends/tests/staf-tests/stress-tests/testcases/replication/replication_modifyrdn_multiple.xml
@@ -70,7 +70,8 @@
                            % (server1Dir, numberOfEntries)
            totalEntries  = numberOfEntries + 2
            
            suffix        = 'modifyrdn_multiple'
            suffix        = 'modifyrdn_multiple'
            consumer      = _topologyServerList[1]
          </script>
@@ -199,6 +200,79 @@
                }
              </call>
              <!-- If the External Changelog is to be tested, install an
               !   stand-alone instance whereto replay the changes -->
              <if expr="globalTestExternalChangelog">
                <sequence>
                  <message>
                    'Test ECL: Install stand-alone instance whereto replay \
                    changes'
                  </message>
                  <!-- Create instance with default parameters read from
                   !   config.py -->
                  <script>
                    standaloneServer = Server(DIRECTORY_INSTANCE_HOST,
                                              DIRECTORY_INSTANCE_DIR,
                                              DIRECTORY_INSTANCE_PORT,
                                              DIRECTORY_INSTANCE_ADMIN_PORT,
                                              DIRECTORY_INSTANCE_SSL_PORT,
                                              None,
                                              DIRECTORY_INSTANCE_DN,
                                              DIRECTORY_INSTANCE_PSWD,
                                              synchroSuffix)
                  </script>
                  <call function="'createInstance'">
                    { 'dsHost'      : standaloneServer.getHostname(),
                      'dsDir'       : standaloneServer.getDir(),
                      'dsPort'      : standaloneServer.getPort(),
                      'dsAdminPort' : standaloneServer.getAdminPort(),
                      'dsSslPort'   : standaloneServer.getSslPort(),
                      'dsJmxPort'   : standaloneServer.getJmxPort(),
                      'dsBindDN'    : standaloneServer.getRootDn(),
                      'dsBindPwd'   : standaloneServer.getRootPwd(),
                      'dsBaseDN'    : standaloneServer.getBaseDn()
                    }
                  </call>
                  <!-- Copy ldif file from "master" -->
                  <script>
                    standaloneLdifFile = '%s/%s_entries.ldif' \
                           % (standaloneServer.getDir(), numberOfEntries)
                  </script>
                  <if expr="masterHost != standaloneServer.getHostname()">
                    <call function="'copyFile'">
                      { 'location'   : masterHost,
                        'srcfile'    : ldifFile,
                        'destfile'   : standaloneLdifFile,
                        'remotehost' : standaloneServer.getHostname()
                      }
                    </call>
                    <else>
                      <script>
                        standaloneLdifFile = ldifFile
                      </script>
                    </else>
                  </if>
                  <!-- Import same data imported into "master"  -->
                  <call function="'ImportLdifWithScript'">
                    { 'location'   : standaloneServer.getHostname(),
                      'dsPath'     : '%s/%s' % \
                                     (standaloneServer.getDir(), OPENDSNAME),
                      'dsBackEnd'  : DIRECTORY_INSTANCE_BE,
                      'dsLdifFile' : standaloneLdifFile
                    }
                  </call>
                  <!-- Start the stand-alone Directory Server -->
                  <call function="'StartDsWithScript'">
                    { 'location' : standaloneServer.getHostname() }
                  </call>
                </sequence>
              </if>
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -337,6 +411,38 @@
                      </loop>
                    </sequence>
                    </block>
                    <!-- If the External Changelog is to be tested, install an
                     !   stand-alone instance whereto replay the changes -->
                    <if expr="globalTestExternalChangelog">
                      <block name="'ecl-test'">
                      <sequence>
                        <message>
                          'replication_modify: Test ECL: Read and replay \
                          changes'
                        </message>
                        <call function="'eclReadAndPlay'">
                          { 'location'       : standaloneServer.getHostname(),
                            'standaloneHost' : standaloneServer.getHostname(),
                            'standalonePort' : standaloneServer.getPort(),
                            'replicaHost1'   : consumer.getHostname(),
                            'replicaPort1'   : consumer.getPort(),
                            'replicaHost2'   : masterHost,
                            'replicaPort2'   : master.getPort(),
                            'bindDn'         : master.getRootDn(),
                            'bindPswd'       : master.getRootPwd(),
                            'eclMode'        : globalExternalChangelogMode,
                            'queueSize'      : 1000,
                            'outputFilename' : '%s/eclReadAndPlay.output' \
                                               % standaloneServer.getDir()
                          }
                        </call>
                      </sequence>
                      </block>
                    </if>
                  </parallel>
              <!--</sequence>
              </timer>
@@ -470,7 +576,74 @@
          </testcase>
          
          <!-- If the External Changelog is to be tested, verify the
           !   synchronisation of the tree in the stand-alone instance -->
          <if expr="globalTestExternalChangelog">
            <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                  'replication_modify: Verify the stand-alone server tree \
                  synchronization'
                </message>
                <script>
                  attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \
                                      clientDataDir
                  tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR
                  ignoreAttrs = []
                  ignoreAttrs.append('ds-sync-generation-id')
                  ignoreAttrs.append('ds-sync-hist')
                  ignoreAttrs.append('ds-sync-state')
                  ignoreAttrs.append('createTimestamp')
                  ignoreAttrs.append('modifyTimestamp')
                  # write out the ldif file
                  outfile = open(tmpFile,"w")
          
                  for line in ignoreAttrs:
                    outfile.write("%s\n" % line)
                  outfile.close()
                </script>
                <if expr="clientHost != STAXServiceMachine">
                  <call function="'copyFile'">
                    { 'location'   : masterHost,
                      'srcfile'    : tmpFile,
                      'destfile'   : attrsToIgnoreFile,
                      'remotehost' : clientHost
                    }
                  </call>
                  <else>
                    <script>
                      attrsToIgnoreFile = tmpFile
                    </script>
                  </else>
                </if>
                <!-- Verify the synchronization of the trees among the servers in
                  the topology -->
                <call function="'verifyTrees'">
                  [ clientHost, clientPath, master, [standaloneServer],
                    synchroSuffix, None, attrsToIgnoreFile ]
                </call>
                <!-- Stop the stand-alone Directory Server -->
                <call function="'StopDsWithScript'">
                  { 'location' : standaloneServer.getHostname() }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
          </if>
          
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/>