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

Gary Williams
23.23.2012 c4d86ee1c859e0b7b5feae6712497b9f96513860
Make setup/cleanup a tescase in replication tests.
14 files modified
195 ■■■■ changed files
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/aci/aci.xml 10 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/basic/basic.xml 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/basic/replication_basic_setup.xml 31 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/binarycopy/binarycopy.xml 10 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/changelog/changelog.xml 9 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/conflict/conflict.xml 7 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/encryption/encryption.xml 9 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/failover/failover.xml 9 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/ldifimport/ldifimport.xml 10 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/replication_cleanup.xml 33 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/replication_setup.xml 34 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/resynchronization/resynchronization.xml 9 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/schema/schema.xml 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/totalupdate/totalupdate.xml 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/aci/aci.xml
@@ -24,7 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2010 Sun Microsystems, Inc.
 !      Portions Copyright 2011 ForgeRock AS.
 !      Portions Copyright 2011-2012 ForgeRock AS.
 ! -->
<stax>
@@ -63,7 +63,8 @@
            file="'%s/testcases/replication/replication_setup.xml'
                  % (TESTS_DIR)"/>
          <call function="'replication_setup'">
            { 'dataFile' : 'Short_Example.ldif' }
            { 'dataFile' : 'Short_Example.ldif' ,
              'label'    : 'Replication ACI' }
          </call>
                                    
          <script>
@@ -1064,11 +1065,12 @@
            </sequence>
          </testcase>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/replication_cleanup.xml' 
                  % (TESTS_DIR)"/>
          <call function="'replication_cleanup'" />
          <call function="'replication_cleanup'" >
            { 'label'    : 'Replication ACI' }
          </call>
          <call function="'testSuite_Postamble'"/>
                  
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/basic/basic.xml
@@ -61,7 +61,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/replication_setup.xml' 
              % (TESTS_DIR)"/>
          <call function="'replication_setup'" />
          <call function="'replication_setup'" >
            { 'label'    : 'Replication Basic' }
          </call>
    
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/basic/replication_basic_setup.xml'
@@ -2048,7 +2050,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/replication_cleanup.xml' 
                  % (TESTS_DIR)"/>
          <call function="'replication_cleanup'" />
          <call function="'replication_cleanup'">
            { 'label'    : 'Replication Basic' }
          </call>
          <call function="'testSuite_Postamble'"/>
        
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/basic/replication_basic_setup.xml
@@ -24,7 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2007-2008 Sun Microsystems, Inc.
 !      Portions Copyright 2011 ForgeRock AS.
 !      Portions Copyright 2011-2012 ForgeRock AS.
 ! -->
<stax>
@@ -32,8 +32,16 @@
  <function name="replication_basic_setup">
    <block name="'replication-basic-setup'">
      <testcase name="getTestCaseName('Basic Preamble')">
        <try>
    <sequence>
            <call function="'testCase_Preamble'"/>
      <!--- Setup the client for the Basic test suite -->      
      <message>
        'Replication: Basic: Setup. Get client ready for Basic tests.'
@@ -122,8 +130,29 @@
        }
      </call>
                                  
              <tcstatus result="'pass'"></tcstatus>
    </sequence>
      
            <catch exception="'STAXException'" typevar="eType" var="eInfo">
              <sequence>
              <message log="1" level="'fatal'">
                '%s: Failed to cleanup. eInfo(%s)' % (eType,eInfo)
              </message>
              <throw exception="'STAFException.TestSuite.CleanupException'" />
              </sequence>
            </catch>
            <finally>
              <!-- Test Case postamble -->
              <call function="'testCase_Postamble'"/>
            </finally>
          </try>
        </testcase>
      </block>
  </function>
</stax>
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/binarycopy/binarycopy.xml
@@ -24,7 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2007-2010 Sun Microsystems, Inc.
 !      Portions Copyright 2011 ForgeRock AS.
 !      Portions Copyright 2011-2012 ForgeRock AS.
 ! -->
<stax>
  <defaultcall function="replication_binarycopy"/>
@@ -53,7 +53,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
                  file="'%s/testcases/replication/replication_setup.xml' 
                        % (TESTS_DIR)"/>
          <call function="'replication_setup'" />
          <call function="'replication_setup'" >
            { 'label'    : 'Replication Binarycopy' }
          </call>
          
          <!--- Test Case information
@@ -406,7 +408,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
                  file="'%s/testcases/replication/replication_cleanup.xml' 
                        % (TESTS_DIR)"/>
          <call function="'replication_cleanup'" />
          <call function="'replication_cleanup'" >
            { 'label'    : 'Replication Binarycopy' }
          </call>
          <call function="'testSuite_Postamble'"/>
        </sequence>
      </block>
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/changelog/changelog.xml
@@ -24,7 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2008-2009 Sun Microsystems, Inc.
 !      Portions Copyright 2011 ForgeRock AS.
 !      Portions Copyright 2011-2012 ForgeRock AS.
 ! -->
<stax>
    
@@ -59,7 +59,8 @@
                  file="'%s/testcases/replication/replication_setup.xml' 
                        % (TESTS_DIR)"/>
          <call function="'replication_setup'">
            { 'dataFile' : 'Example.ldif' }
            { 'dataFile' : 'Example.ldif',
              'label'    : 'Replication Changelog' }
          </call>         
@@ -1448,7 +1449,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
                  file="'%s/testcases/replication/replication_cleanup.xml' 
                        % (TESTS_DIR)"/>
          <call function="'replication_cleanup'" />
          <call function="'replication_cleanup'" >
            { 'label'    : 'Replication Changelog' }
          </call>
          <call function="'testSuite_Postamble'"/>
        </sequence>
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/conflict/conflict.xml
@@ -66,7 +66,8 @@
                                      % REPLICATION_CONFIG_DIR,
              'dataFile'           : 'Short_Example.ldif',
              'isolateLdapServers' : True,
              'enableDebugLogs'    : False
              'enableDebugLogs'    : False,
              'label'              : 'Replication Conflict'
            }
          </call>
                                    
@@ -3549,7 +3550,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/replication_cleanup.xml' 
                  % (TESTS_DIR)"/>
          <call function="'replication_cleanup'" />
          <call function="'replication_cleanup'" >
            { 'label'    : 'Replication Conflict' }
          </call>
                          
          <call function="'testSuite_Postamble'"/>
                  
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/encryption/encryption.xml
@@ -24,7 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2007-2010 Sun Microsystems, Inc.
 !      Portions Copyright 2011 ForgeRock AS.
 !      Portions Copyright 2011-2012 ForgeRock AS.
 ! -->
<stax>
@@ -65,7 +65,8 @@
            { 'topologyFile'     : '%s/3server_topology.txt' \
                                    % REPLICATION_CONFIG_DIR,
              'secureReplication': True,
              'dataFile'         : 'Example.ldif'
              'dataFile'         : 'Example.ldif',
              'label'            : 'Replication Encryption'
            }
          </call>
                                    
@@ -941,7 +942,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/replication_cleanup.xml' 
                  % (TESTS_DIR)"/>
          <call function="'replication_cleanup'" />
          <call function="'replication_cleanup'" >
            { 'label'    : 'Replication Encryption' }
          </call>
          <call function="'testSuite_Postamble'"/>
                  
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/failover/failover.xml
@@ -24,7 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2007-2010 Sun Microsystems, Inc.
 !      Portions Copyright 2011 ForgeRock AS.
 !      Portions Copyright 2011-2012 ForgeRock AS.
 ! -->
<stax>
@@ -60,7 +60,8 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/replication_setup.xml' % (TESTS_DIR)"/>
          <call function="'replication_setup'">
            {  'topologyFile' : '%s/3server_topology.txt' % REPLICATION_CONFIG_DIR }
            {  'topologyFile' : '%s/3server_topology.txt' % REPLICATION_CONFIG_DIR ,
               'label'        : 'Replication Failover' }
          </call>
                                    
          <script>
@@ -528,7 +529,9 @@
                                                
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'replication_cleanup'" />
          <call function="'replication_cleanup'" >
            { 'label' : 'Replication Failover' }
          </call>
                          
          <call function="'testSuite_Postamble'"/>
                  
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/ldifimport/ldifimport.xml
@@ -24,7 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2007-2010 Sun Microsystems, Inc.
 !      Portions Copyright 2011 ForgeRock AS.
 !      Portions Copyright 2011-2012 ForgeRock AS.
 ! -->
<stax>
@@ -62,7 +62,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/replication_setup.xml'
                  % (TESTS_DIR)"/>
          <call function="'replication_setup'" />
          <call function="'replication_setup'" >
            { 'label'    : 'Replication LDIFimport' }
          </call>
     
            
          <!--- Test Case information
@@ -420,7 +422,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/replication_cleanup.xml'
                  % (TESTS_DIR)"/>
          <call function="'replication_cleanup'" />
          <call function="'replication_cleanup'" >
            { 'label'    : 'Replication LDIFimport' }
          </call>
                          
          <call function="'testSuite_Postamble'"/>
                  
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/replication_cleanup.xml
@@ -24,6 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2007-2008 Sun Microsystems, Inc.
 !      Portions Copyright 2012 ForgeRock AS.
 ! -->
<stax>
@@ -39,12 +40,25 @@
        </function-arg-description>
        <function-arg-property name="type" value="string"/>
      </function-arg-def>
      <function-arg-def name="label"
                        type="optional"
                        default="'Replication'">
        <function-arg-description>
          Friendly label name
        </function-arg-description>
        <function-arg-property name="type" value="string"/>
      </function-arg-def>
    </function-map-args>
    <sequence>
      <block name="'replication-cleanup'">
        <testcase name="getTestCaseName('%s Cleanup' % label)">
          <try>
        <sequence>                      
              <call function="'testCase_Preamble'"/>
                  
          <!-- Stop the servers in the topology -->      
          <call function="'stopServers'">
@@ -116,8 +130,27 @@
              'result'     : STAXResult }
          </call>
              <tcstatus result="'pass'"></tcstatus>
        </sequence>
            <catch exception="'STAXException'" typevar="eType" var="eInfo">
              <sequence>
              <message log="1" level="'fatal'">
                '%s: Failed to cleanup. eInfo(%s)' % (eType,eInfo)
              </message>
              <throw exception="'STAFException.TestSuite.CleanupException'" />
              </sequence>
            </catch>
            <finally>
              <!-- Test Case postamble -->
              <call function="'testCase_Postamble'"/>
            </finally>
          </try>
        </testcase>
      </block>
    
    </sequence>
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/replication_setup.xml
@@ -24,7 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2007-2010 Sun Microsystems, Inc.
 !      Portions Copyright 2011 ForgeRock AS.
 !      Portions Copyright 2011-2012 ForgeRock AS.
 ! -->
<stax>
@@ -77,13 +77,26 @@
        </function-arg-description>
        <function-arg-property name="type" value="boolean"/>          
      </function-arg-def>
      <function-arg-def name="label"
                        type="optional"
                        default="'Replication'">
        <function-arg-description>
          Friendly label name
        </function-arg-description>
        <function-arg-property name="type" value="string"/>
      </function-arg-def>
    </function-map-args>    
    
    <sequence>
      <block name="'replication-setup'">
        <testcase name="getTestCaseName('%s Setup' % label)">
          <try>
        <sequence>
              <call function="'testCase_Preamble'"/>
      
          <message>
             'Create DS topology as described in %s' % topologyFile
@@ -559,8 +572,27 @@
            </paralleliterate>
          </if>
              <tcstatus result="'pass'"></tcstatus>
        </sequence>
            <catch exception="'STAXException'" typevar="eType" var="eInfo">
              <sequence>
              <message log="1" level="'fatal'">
                '%s: Failed to cleanup. eInfo(%s)' % (eType,eInfo)
              </message>
              <throw exception="'STAFException.TestSuite.CleanupException'" />
              </sequence>
            </catch>
            <finally>
              <!-- Test Case postamble -->
              <call function="'testCase_Postamble'"/>
            </finally>
          </try>
        </testcase>
      </block>
    
    </sequence>
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/resynchronization/resynchronization.xml
@@ -24,7 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2007-2010 Sun Microsystems, Inc.
 !      Portions Copyright 2011 ForgeRock AS.
 !      Portions Copyright 2011-2012 ForgeRock AS.
 ! -->
<stax>
  <defaultcall function="replication_resynchronization"/>
@@ -56,7 +56,8 @@
          <call function="'replication_setup'">
            { 'topologyFile' : '%s/3server_topology.txt' \
                               % REPLICATION_CONFIG_DIR,
              'dataFile'     : 'Example.ldif'
              'dataFile'     : 'Example.ldif' ,
              'label'    : 'Replication Resync'
            }
          </call>
          
@@ -830,7 +831,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
                  file="'%s/testcases/replication/replication_cleanup.xml' 
                        % (TESTS_DIR)"/>
          <call function="'replication_cleanup'" />
          <call function="'replication_cleanup'" >
            { 'label'    : 'Replication Resync' }
          </call>
          
          <call function="'testSuite_Postamble'"/>
        </sequence>
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/schema/schema.xml
@@ -60,7 +60,9 @@
                                                                        
          <import machine="STAF_LOCAL_HOSTNAME"
           file="'%s/testcases/replication/replication_setup.xml' % TESTS_DIR"/>
          <call function="'replication_setup'" />
          <call function="'replication_setup'" >
            { 'label'    : 'Replication Schema' }
          </call>
                                    
          <script>
            synchroSuffix = master.getSynchronizedSuffixList()[0].getSuffixDn()    
@@ -1037,7 +1039,9 @@
                                                
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/replication_cleanup.xml' % TESTS_DIR"/>
          <call function="'replication_cleanup'" />
          <call function="'replication_cleanup'" >
            { 'label'    : 'Replication Schema' }
          </call>
                          
          <call function="'testSuite_Postamble'"/>
                  
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/replication/totalupdate/totalupdate.xml
@@ -55,7 +55,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/replication_setup.xml' 
              % (TESTS_DIR)"/>
          <call function="'replication_setup'" />
          <call function="'replication_setup'" >
            { 'label'    : 'Replication Totalupdate' }
          </call>
          
          <script>
            server1DataDir = '%s' % server1.getDataDir()
@@ -544,7 +546,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/replication_cleanup.xml' 
                 % (TESTS_DIR)"/>
          <call function="'replication_cleanup'" />
          <call function="'replication_cleanup'" >
            { 'label'    : 'Replication Totalupdate' }
          </call>
          
          <call function="'testSuite_Postamble'"/>
        </sequence>