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

Gary Williams
23.33.2014 6d72f0f932ed812d52dd190401b17fed69c52547
Fixes for replication fractional test suite
6 files modified
114 ■■■■ changed files
opends/tests/staf-tests/functional-tests/testcases/fractional-replication/basic.xml 12 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/fractional-replication/config.xml 12 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/fractional-replication/fractional-replication.xml 64 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/fractional-replication/fractional-replication_cleanup.xml 11 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/fractional-replication/fractional-replication_setup.xml 12 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/fractional-replication/utils.xml 3 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/fractional-replication/basic.xml
@@ -23,7 +23,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2009-2010 Sun Microsystems, Inc.
 !      Portions Copyright 2011-2013 ForgeRock AS.
 !      Portions Copyright 2011-2014 ForgeRock AS.
 ! -->
<stax>
  <defaultcall function="fractional-replication_basic"/>
@@ -47,7 +47,7 @@
            <script>
              if not CurrentTestPath.has_key('group'):
                CurrentTestPath['group']='fractional-replication'
              CurrentTestPath['suite']=STAXCurrentBlock
              CurrentTestPath['suite']='basic'
            </script>
            <call function="'testSuite_Preamble'"/>
@@ -58,7 +58,9 @@
                <import machine="STAF_LOCAL_HOSTNAME"
                  file="'%s/testcases/fractional-replication/fractional-replication_setup.xml'
                    % (TESTS_DIR)"/>
                <call function="'fractional-replication_setup'" />
                <call function="'fractional-replication_setup'">
                  { 'label' : "Basic" }
                </call>
                <script>
                  Pservers = _topologyServerList
@@ -132,7 +134,9 @@
                  <import machine="STAF_LOCAL_HOSTNAME"
                    file="'%s/testcases/fractional-replication/fractional-replication_cleanup.xml'
                          % (TESTS_DIR)"/>
                  <call function="'fractional-replication_cleanup'" />
                <call function="'fractional-replication_cleanup'">
                  { 'label' : "Basic" }
                </call>
                </sequence>
                <catch exception="'STAFException'">
                  <sequence>
opends/tests/staf-tests/functional-tests/testcases/fractional-replication/config.xml
@@ -23,7 +23,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2009 Sun Microsystems, Inc.
 !      Portions Copyright 2012-2013 ForgeRock AS
 !      Portions Copyright 2012-2014 ForgeRock AS
 ! -->
<stax>
  <defaultcall function="fractional-replication_config"/>
@@ -46,7 +46,7 @@
            <script>
              if not CurrentTestPath.has_key('group'):
                CurrentTestPath['group']='fractional-replication'
              CurrentTestPath['suite']=STAXCurrentBlock
              CurrentTestPath['suite']='config'
            </script>
            <call function="'testSuite_Preamble'"/>
@@ -57,7 +57,9 @@
                <import machine="STAF_LOCAL_HOSTNAME"
                  file="'%s/testcases/fractional-replication/fractional-replication_setup.xml'
                    % (TESTS_DIR)"/>
                <call function="'fractional-replication_setup'" />
                <call function="'fractional-replication_setup'">
                  { 'label' : "Config" }
                </call>
                <script>
                  server = _topologyServerList[0]
@@ -129,7 +131,9 @@
                  <import machine="STAF_LOCAL_HOSTNAME"
                    file="'%s/testcases/fractional-replication/fractional-replication_cleanup.xml'
                          % (TESTS_DIR)"/>
                  <call function="'fractional-replication_cleanup'" />
                <call function="'fractional-replication_cleanup'">
                  { 'label' : "Config" }
                </call>
                </sequence>
                <catch exception="'STAFException'">
                  <sequence>
opends/tests/staf-tests/functional-tests/testcases/fractional-replication/fractional-replication.xml
@@ -23,12 +23,8 @@
 ! CDDL HEADER END
 !
 !      Copyright 2009 Sun Microsystems, Inc.
 !      Portions Copyright 2013-2014 ForgeRock AS
 ! -->
<!--
  Place group-specific test information here.
  #@TestGroupName       fractional-replication
  #@TestGroupPurpose    Test the ability to work with fractional replication
-->
<stax>
  <defaultcall function="main_fractional-replication"/>
  <function name="main_fractional-replication">
@@ -36,7 +32,9 @@
      <function-required-arg name="STAXParentID"/>
    </function-list-args>
    <sequence>
      <try>
        <block name="'fractional-replication'">
          <sequence>
            <!--- Load the job environment for the test group execution -->
@@ -48,45 +46,71 @@
            <script>
              CurrentTestPath['group']='fractional-replication'
            </script>
            <call function="'testGroup_Preamble'"/>
            <!-- List of fractional-replication test suites to run -->
            <call function="'testGroup_Preamble'"/>
            <!-- List of replication test suites to run -->
            <script>
              suiteList = []
              suiteList.append('config')
              suiteList.append('basic')
              globalAssuredReplication = None
              if (REPLICATION_SPLIT_SERVERS == 'true'):
                globalSplitServers = True
              else:
                globalSplitServers = None
            </script>
            <import machine="STAF_LOCAL_HOSTNAME"
                    file="'%s/testcases/fractional-replication/utils.xml' %
                      (TESTS_DIR)"/>
            <iterate var="_suite" in="suiteList" >
              <sequence>
                <import machine="STAF_LOCAL_HOSTNAME"
                        file="'%s/testcases/fractional-replication/%s.xml' %
                          (TESTS_DIR, _suite)"/>
                <call function="'fractional-replication_%s'% _suite" />
              </sequence>
              <try>
                <sequence>
                  <import machine="STAF_LOCAL_HOSTNAME"
                          file="'%s/testcases/fractional-replication/%s.xml' %
                            (TESTS_DIR,_suite)"/>
                  <call function="'fractional-replication_%s'% _suite" />
                </sequence>
                <catch exception="'STAFException.TestSuite.SetupException'">
                  <message log="1" level="'fatal'">
                    'Setup of test suite %s failed.' % _suite
                  </message>
                </catch>
                <catch exception="'STAFException.TestSuite.MainException'">
                  <message log="1" level="'fatal'">
                    'Main part of test suite %s failed.' % _suite
                  </message>
                </catch>
                <catch exception="'STAFException.TestSuite.CleanupException'">
                  <message log="1" level="'fatal'">
                    'Cleanup of test suite %s failed.' % _suite
                  </message>
                </catch>
              </try>
            </iterate>
          </sequence>
        </block>
        <catch exception="'STAXException.TestGroupException'">
          <sequence>
            <message log="1" level="'fatal'">'Execution of Test Group Failed'</message>
          </sequence>
          <message log="1" level="'fatal'">
            'Execution of Test Group Failed'
          </message>
        </catch>
        <finally>
          <!-- Test Group postamble -->
          <call function="'testGroup_Postamble'"/>
        </finally>
      </try>
    </sequence>
  </function>
</stax>
opends/tests/staf-tests/functional-tests/testcases/fractional-replication/fractional-replication_cleanup.xml
@@ -23,6 +23,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2009 Sun Microsystems, Inc.
 !      Portions Copyright 2014 ForgeRock AS.
 ! -->
<stax>
@@ -38,12 +39,20 @@
        </function-arg-description>
        <function-arg-property name="type" value="string"/>
      </function-arg-def>
      <function-arg-def name="label"
                        type="optional"
                        default="None">
        <function-arg-description>
          Convenience label
        </function-arg-description>
        <function-arg-property name="type" value="string"/>
      </function-arg-def>
    </function-map-args>
    <sequence>
      <block name="'fractional-replication-cleanup'">
        <testcase name="getTestCaseName('Fractional Repl Cleanup')">
        <testcase name="getTestCaseName('Fractional Repl %s Cleanup' % label)">
          <try>
          
opends/tests/staf-tests/functional-tests/testcases/fractional-replication/fractional-replication_setup.xml
@@ -23,7 +23,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2009-2010 Sun Microsystems, Inc.
 !      Portions Copyright 2011-2012 ForgeRock AS.
 !      Portions Copyright 2011-2014 ForgeRock AS.
 ! -->
<stax>
@@ -76,13 +76,21 @@
        </function-arg-description>
        <function-arg-property name="type" value="boolean"/>
      </function-arg-def>
      <function-arg-def name="label"
                        type="optional"
                        default="None">
        <function-arg-description>
          Convenience label
        </function-arg-description>
        <function-arg-property name="type" value="string"/>
      </function-arg-def>
    </function-map-args>
    <sequence>
      <block name="'fractional-replication-startup'">
        <testcase name="getTestCaseName('Fractional Repl Setup')">
        <testcase name="getTestCaseName('Fractional Repl %s Setup' % label)">
          <try>
          
opends/tests/staf-tests/functional-tests/testcases/fractional-replication/utils.xml
@@ -23,7 +23,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2009-2010 Sun Microsystems, Inc.
 !      Portions Copyright 2012-2013 ForgeRock AS.
 !      Portions Copyright 2012-2014 ForgeRock AS.
 ! -->
<stax>
  <function name="get-fractional-replication-attributes" scope="local">
@@ -424,6 +424,7 @@
          'dsFilter'          : "objectclass=*",
          'dsScope'           : "base",
          'dsAttributes'      : "objectClasses attributeTypes",
          'expectedRC'        : "noCheck"
        }
      </call>
      <script>