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

al_xipe
25.28.2007 34f13c3b2911e3c41aaccbd6422f529a80bb04a2
fix for replication resynchronization tests to account for the new index key map
1 files modified
90 ■■■■■ changed files
opends/tests/functional-tests/testcases/replication/resynchronization/resynchronization.xml 90 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/replication/resynchronization/resynchronization.xml
@@ -26,25 +26,17 @@
 !      Portions Copyright 2006-2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="replication_resynchronization"/>
  <function name="replication_resynchronization">
    <sequence>
      <block name="'resynchronization'">
        <sequence>
          <script>
            if not CurrentTestPath.has_key('group'):
              CurrentTestPath['group']='replication'                 
            CurrentTestPath['suite']=STAXCurrentBlock
          </script>
          <call function="'testSuite_Preamble'"/>
          <!--- Test Suite information
          #@TestSuiteName       Replication Re-Synchronization Tests
          #@TestSuitePurpose    Verify that the servers in a replicated topology can be initialised with an old backup and still re-synchronize.
@@ -55,7 +47,6 @@
          #@TestHTMLLink        http://opends.dev.java.net/
          -->
            
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/replication_setup.xml' % (TESTS_DIR)"/>
          <call function="'replication_setup'" />
@@ -86,13 +77,13 @@
                [_topologyServerList]
              </call>
              
              <!-- Import data into "master" server -->              
              <call function="'ImportLdifWithScript'">
                { 'location'     : masterHost,
                  'dsPath'       : masterPath,
                  'dsBackEnd'    : 'userRoot',             
                  'dsLdifFile'   : '%s/replication/Example.ldif' % masterDataDir }
                  'dsLdifFile' : '%s/replication/Example.ldif' % masterDataDir
                }
              </call>
              <!-- Check some data was imported into "master" server -->    
@@ -105,25 +96,25 @@
                  'dsPswd'    : master.getRootPwd(),
                  'expectedEntries' : ['uid=scarter,ou=People,o=example',
                                       'uid=dmiller, ou=People, o=example',
                                       'uid=rhunt, ou=People, o=example'] }
                                       'uid=rhunt, ou=People, o=example']
                }
              </call>
                
              <!-- Backup "master" server -->  
              <call function="'backup'">
                { 'location'  :  masterHost,
                  'dsPath'  :  masterPath,
                  'backupDir'  :  '%s/replication/master_backup' % masterDataDir }
                  'backupDir' :  '%s/replication/master_backup' % masterDataDir
                }
              </call>                
              <!-- Start the "master" server -->
              <call function="'StartDsWithScript'">
                { 'location'  :  masterHost,
                  'dsPath'  :  masterPath }
                  'dsPath'  :  masterPath
                }
              </call>
              <!-- Add entry to "master" server -->                       
              <call function="'addEntry'">
                { 'location'       : clientHost,
@@ -132,51 +123,50 @@
                  'dsInstancePort' : master.getPort(), 
                  'dsInstanceDn'   : master.getRootDn(),
                  'dsInstancePswd' : master.getRootPwd(),
                  'entryToBeAdded' : '%s/replication/tfitter.ldif' % clientDataDir }
                  'entryToBeAdded' : '%s/replication/tfitter.ldif' % clientDataDir
                }
              </call>         
                                                                                                
              <!-- Copy backup to "consumer" servers and restore it -->
              <paralleliterate var="consumer" in="consumerList">
                <sequence>
                  <call function="'copyFile'">
                    { 'srcfile'    : '%s/config/schematokens.dat' % dsPath,
                      'destfile'   : '%s/%s/config/schematokens.dat' % (consumer.getDir(),OPENDSNAME),
                      'remotehost' : consumer.getHostname()
                    }
                  </call>
                  <call function="'CopyFolderByExtension'">
                    { 'location'   :  masterHost,
                      'remotehost'  :  consumer.getHostname(),
                      'srcfolder'  :  '%s/replication/master_backup' % masterDataDir,
                      'destfolder' :  '%s/%s/replication/master_backup' % (consumer.getDir(),relativeDataDir),
                      'extension'  : '*' }
                      'extension'  : '*'
                    }
                  </call>                 
                  <call function="'restore'">
                    { 'location'  :  consumer.getHostname(),
                      'dsPath'  :  '%s/%s' % (consumer.getDir(), OPENDSNAME),
                      'backupDir'  :  '%s/%s/replication/master_backup' % (consumer.getDir(),relativeDataDir) }
                      'backupDir' :  '%s/%s/replication/master_backup' % (consumer.getDir(),relativeDataDir)
                    }
                  </call>                                              
                </sequence>                  
              </paralleliterate>
                
              <!-- Start the "consumer" servers -->  
              <call function="'startServers'">
                [consumerList]
              </call>                
              <!-- Verify the synchronization of the trees among the servers in the topology -->          
              <call function="'verifyTrees'">
                [ clientHost, clientPath, master, consumerList, synchroSuffix ]
              </call> 
              <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>                     
                      
          <!--- Test Case information
          #@TestMarker          Replication Re-Synchronization Tests
          #@TestName            Replication: Re-Synchronization: On-line initialisation
@@ -207,7 +197,8 @@
                  'dsInstancePort'  :  master.getPort(),
                  'dsInstanceDn'  : master.getRootDn(),
                  'dsInstancePswd' :  master.getRootPwd(),
                  'dsDn'  :  ['uid=tfitter, ou=People,%s' % synchroSuffix] }
                  'dsDn'           : ['uid=tfitter, ou=People,%s' % synchroSuffix]
                }
              </call>                                                                
                                
              <!-- Import data into "master" server -->              
@@ -219,7 +210,8 @@
                  'dsInstanceDn'  :  master.getRootDn(),
                  'dsInstancePswd'  :  master.getRootPwd(),
                  'taskID'  :  'import task',
                  'ldifFile'  :  '%s/replication/Example.ldif' % masterDataDir }
                  'ldifFile'       : '%s/replication/Example.ldif' % masterDataDir
                }
              </call>
              <!-- Check some data was imported into "master" server -->    
@@ -233,10 +225,10 @@
                  'expectedEntries' : ['uid=scarter,ou=People,o=example',
                                       'uid=dmiller, ou=People, o=example',
                                       'uid=rhunt, ou=People, o=example'],
                  'startDS'  :  'no' }
                  'startDS'         :  'no'
                }
              </call>
                
              <!-- Backup "master" server -->  
              <call function="'backupTask'">
                { 'location'  :  clientHost,
@@ -246,11 +238,10 @@
                  'dsInstanceDn'  :  master.getRootDn(),
                  'dsInstancePswd'  :  master.getRootPwd(),
                  'taskID'  :  'backup task',
                  'backupDir'  :  '%s/replication/master_backup_online' % masterDataDir }
                  'backupDir'      : '%s/replication/master_backup_online' % masterDataDir
                }
              </call>
              <!-- Add entry to "master" server -->                       
              <call function="'addEntry'">
                { 'location'       : clientHost,
@@ -259,19 +250,26 @@
                  'dsInstancePort' : master.getPort(), 
                  'dsInstanceDn'   : master.getRootDn(),
                  'dsInstancePswd' : master.getRootPwd(),
                  'entryToBeAdded' : '%s/replication/tfitter.ldif' % clientDataDir }
                  'entryToBeAdded' : '%s/replication/tfitter.ldif' % clientDataDir
                }
              </call>         
                                                                                                
              <!-- Copy backup to "consumer" servers and restore it -->
              <paralleliterate var="consumer" in="consumerList">
                <sequence>
                  <call function="'copyFile'">
                    { 'srcfile'    : '%s/config/schematokens.dat' % dsPath,
                      'destfile'   : '%s/%s/config/schematokens.dat' % (consumer.getDir(),OPENDSNAME),
                      'remotehost' : consumer.getHostname()
                    }
                  </call>
                  <call function="'CopyFolderByExtension'">
                    { 'location'   :  masterHost,
                      'remotehost'  :  consumer.getHostname(),
                      'srcfolder'  :  '%s/replication/master_backup_online' % masterDataDir,
                      'destfolder' :  '%s/%s/replication/master_backup_online' % (consumer.getDir(),relativeDataDir),
                      'extension'  : '*' }
                      'extension'  : '*'
                    }
                  </call>         
                  <call function="'restoreTask'">
@@ -282,13 +280,12 @@
                      'dsInstanceDn'  :  consumer.getRootDn(),
                      'dsInstancePswd'  :  consumer.getRootPwd(),
                      'taskID'  :  'restore task',
                      'backupDir'  :  '%s/%s/replication/master_backup_online' % (consumer.getDir(),relativeDataDir) }
                      'backupDir'      : '%s/%s/replication/master_backup_online' % (consumer.getDir(),relativeDataDir)
                    }
                  </call>                                              
                </sequence>                  
              </paralleliterate>
              <!-- Verify the synchronization of the trees among the servers in the topology -->          
              <call function="'verifyTrees'">
                [ clientHost, clientPath, master, consumerList, synchroSuffix ]
@@ -298,20 +295,13 @@
            </sequence>
          </testcase>                     
                                                                      
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'replication_cleanup'" />
                          
          <call function="'testSuite_Postamble'"/>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>