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

Christophe Sovant
10.30.2013 32bcf2f71fb3abaec97a07e81247ef6d4fdb7c37
CR-1828 Updated import_ldif and operations stress tests
15 files modified
117 ■■■■■ changed files
opends/tests/staf-tests/shared/ant/build.properties 1 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/functions/sdk.xml 14 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/functions/utils.xml 2 ●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/tests/config.py.stubs 2 ●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif.xml 15 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_bin_attr_10m.xml 2 ●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_bin_attr_6m.xml 3 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_large_import_buffer.xml 11 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_low_index_entry_limit.xml 10 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_many_indexes.xml 10 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_many_thrds.xml 12 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_out-of-box.xml 6 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr.xml 10 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr_with_load.xml 9 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/stress-tests/testcases/importldif/importldif.xml 10 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/ant/build.properties
@@ -111,6 +111,7 @@
opends.admin.pwd=password
snmp.opendmk.lib.dir=
ldclt.dir=
sdk.dir=
temp.dir=/tmp
test.plan.custom=
test.plan.functional.default=aci,backends,clu,clu_secure,core,dsconfig,dsml,fractional-replication,groups,i18n,indexes,logging,monitoring,password_policy,plugins,privileges,pta,replication,schema,security,setup,snmp,tasks,virtualAttributes,replication-safe-data,replication-safe-read
opends/tests/staf-tests/shared/functions/sdk.xml
@@ -23,7 +23,7 @@
 !
 ! CDDL HEADER END
 !
 !      Copyright 2011 ForgeRock AS
 !      Copyright 2011-2013 ForgeRock AS
 ! -->
<stax>
  <!-- SDK ldapsearch Function -->
@@ -533,13 +533,13 @@
          
        if extraParams:
          STAFCmdParamsList.append('%s' % extraParams)
        if attribute:
          STAFCmdParamsList.append('%s' % attribute)
        if formatString:
          STAFCmdParamsList.append(':%s' % formatString)
          if formatString:
            STAFCmdParamsList.append('%s:%s' % (attribute,formatString))
          else:
            STAFCmdParamsList.append('%s' % attribute)
        STAFCmdParams=' '.join(STAFCmdParamsList)
      </script>
      <call function="'runCommand'">
opends/tests/staf-tests/shared/functions/utils.xml
@@ -812,7 +812,7 @@
      <if expr="checkRC != 48">
        <sequence>
          <message>
          <message log="1" level="'Error'">
            'Server is not stopped after %sms \
            (%s/logs/server.pid still exists on %s)' \
            % (noOfLoops*noOfMilliSeconds,dsPath,location)
opends/tests/staf-tests/shared/tests/config.py.stubs
@@ -87,4 +87,4 @@
VERBOSE_MODE                  = '${verbose.mode}'
TEST_PLAN_CUSTOM              = '${test.plan.custom}'
ORIGINAL_ARCHIVE              = '${original.archive}'
SDK_BIN                       = '/path/to/sdk/bin'
SDK_BIN                       = '${sdk.dir}'
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif.xml
@@ -24,6 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2008-2009 Sun Microsystems, Inc.
 !      Portions Copyright 2013 ForgeRock AS
 ! -->
<stax>
@@ -59,13 +60,13 @@
            testList.append('import_ldif_bin_attr')
            testList.append('import_ldif_bin_attr_6m')
            testList.append('import_ldif_bin_attr_10m')
            #testList.append('import_ldif_large_import_buffer')
            #testList.append('import_ldif_many_thrds')
            #testList.append('import_ldif_low_index_entry_limit')
            #testList.append('import_ldif_out-of-box')
            #testList.append('import_ldif_many_indexes')
            #testList.append('import_ldif_tasks_bin_attr')
            #testList.append('import_ldif_tasks_bin_attr_with_load')
            testList.append('import_ldif_large_import_buffer')
            testList.append('import_ldif_many_thrds')
            testList.append('import_ldif_low_index_entry_limit')
            testList.append('import_ldif_out-of-box')
            testList.append('import_ldif_many_indexes')
            testList.append('import_ldif_tasks_bin_attr')
            testList.append('import_ldif_tasks_bin_attr_with_load')
          </script>
          <iterate var="__test" in="testList">
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_bin_attr_10m.xml
@@ -438,7 +438,7 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'">
            { 'suiteSuffix' : 'import_1m' }
            { 'suiteSuffix' : 'import_10m' }
          </call>
          <call function="'testSuite_Postamble'"/>
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_bin_attr_6m.xml
@@ -24,6 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2009 Sun Microsystems, Inc.
 !      Portions Copyright 2013 ForgeRock AS
 ! -->
<stax>
@@ -288,7 +289,7 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'">
            { 'suiteSuffix' : 'import_3m' }
            { 'suiteSuffix' : 'import_6m' }
          </call>
          <call function="'testSuite_Postamble'"/>
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_large_import_buffer.xml
@@ -24,6 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2008-2010 Sun Microsystems, Inc.
 !      Portions Copyright 2013 ForgeRock AS
 ! -->
<stax>
@@ -81,13 +82,14 @@
                </call>
                <script>
                    numberOfEntries='100000'
                    bin_attr_filename = '%s_entries.ldif' % numberOfEntries
                    import os.path
                    curr_filename=remote.temp + "/" + bin_attr_filename
                    curr_file_exists='0'
                    if os.path.exists(curr_filename):
                      curr_file_exists='1'
                    numberOfEntries='100000'
                </script>
                <message>
@@ -205,8 +207,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'" />
          <call function="'import_ldif_cleanup'">
            { 'suiteSuffix' : 'large_import_buffer' }
          </call>
          <call function="'testSuite_Postamble'"/>
            
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_low_index_entry_limit.xml
@@ -82,13 +82,14 @@
                </call>
                <script>
                    numberOfEntries='100000'
                    bin_attr_filename = '%s_entries.ldif' % numberOfEntries
                    import os.path
                    curr_filename=remote.temp + "/" + bin_attr_filename
                    curr_file_exists='0'
                    if os.path.exists(curr_filename):
                      curr_file_exists='1'
                    numberOfEntries='100000'
                </script>
                
                <message>
@@ -206,8 +207,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'" />
          <call function="'import_ldif_cleanup'">
            { 'suiteSuffix' : 'low_index_entry_limit' }
          </call>
          <call function="'testSuite_Postamble'"/>
            
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_many_indexes.xml
@@ -24,6 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2008-2010 Sun Microsystems, Inc.
 !      Portions Copyright 2013 ForgeRock AS
 ! -->
<stax>
@@ -97,7 +98,7 @@
                    'subcommand'           : 'create-local-db-index' ,
                    'objectType'           : 'backend-name' ,
                    'objectName'           : 'userRoot',
                    'optionsString'        : '--index-name description --add index-type:approximate --add index-type:equality --add index-type:presence --add index-type:substring ' ,
                    'optionsString'        : '--index-name description --set index-type:approximate --set index-type:equality --set index-type:presence --set index-type:substring ' ,
                    'expectedRC'           : 0 } 
                </call> 
         
@@ -108,7 +109,7 @@
                    'subcommand'           : 'create-local-db-index' ,
                    'objectType'           : 'backend-name' ,
                    'objectName'           : 'userRoot',
                    'optionsString'        : '--index-name employeeNumber --add index-type:approximate --add index-type:equality --add index-type:ordering --add index-type:presence --add index-type:substring ' ,
                    'optionsString'        : '--index-name employeeNumber --set index-type:approximate --set index-type:equality --set index-type:ordering --set index-type:presence --set index-type:substring ' ,
                    'expectedRC'           : 0 } 
                </call> 
         
@@ -241,8 +242,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'" />
          <call function="'import_ldif_cleanup'">
            { 'suiteSuffix' : 'many_indexes' }
          </call>
          <call function="'testSuite_Postamble'"/>
            
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_many_thrds.xml
@@ -94,13 +94,14 @@
                </call>
                <script>
                    numberOfEntries='100000'
                    bin_attr_filename = '%s_entries.ldif' % numberOfEntries
                    import os.path
                    curr_filename=remote.temp + "/" + bin_attr_filename
                    curr_file_exists='0'
                    if os.path.exists(curr_filename):
                      curr_file_exists='1'
                    numberOfEntries='100000'
                </script>
                
                <message>
@@ -145,7 +146,7 @@
                
                <call function="'ImportLdifWithScript'">
                { 'location'    : STAF_REMOTE_HOSTNAME ,
                  'difFile'     : curr_filename ,
                  'ldifFile'     : curr_filename ,
                  'backEnd'     : 'userRoot'}
                </call>
    
@@ -218,8 +219,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'" />
          <call function="'import_ldif_cleanup'">
            { 'suiteSuffix' : 'many_thrds' }
          </call>
          <call function="'testSuite_Postamble'"/>
            
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_out-of-box.xml
@@ -24,6 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2008-2010 Sun Microsystems, Inc.
 !      Portions Copyright 2013 ForgeRock AS
 ! -->
<stax>
@@ -170,8 +171,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'" />
          <call function="'import_ldif_cleanup'">
            { 'suiteSuffix' : 'out_of_box' }
          </call>
          <call function="'testSuite_Postamble'"/>
            
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr.xml
@@ -54,13 +54,14 @@
              <sequence>
                <call function="'testCase_Preamble'"/>
                <script>
                    numberOfEntries='100000'
                    bin_attr_filename = '%s_entries.ldif' % numberOfEntries
                    import os.path
                    curr_filename=remote.temp + "/" + bin_attr_filename
                    curr_file_exists='0'
                    if os.path.exists(curr_filename):
                      curr_file_exists='1'
                    numberOfEntries='100000'
                </script>
                
                <message>
@@ -156,8 +157,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'" />
          <call function="'import_ldif_cleanup'">
            { 'suiteSuffix' : 'tasks' }
          </call>
          <call function="'testSuite_Postamble'"/>
            
opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr_with_load.xml
@@ -24,6 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2008-2010 Sun Microsystems, Inc.
 !      Portions Copyright 2013 ForgeRock AS
 ! -->
<stax>
@@ -100,6 +101,9 @@
             <sequence>
               <call function="'testCase_Preamble'"/>
               <script>
                    numberOfEntries='100000'
                    bin_attr_filename = '%s_entries.ldif' % numberOfEntries
                    import os.path
                    curr_filename=remote.temp + "/" + bin_attr_filename
                    curr_file_exists='0'
@@ -248,8 +252,9 @@
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'" />
          <call function="'import_ldif_cleanup'">
            { 'suiteSuffix' : 'tasks_with_load' }
          </call>
          <call function="'testSuite_Postamble'"/>
            
opends/tests/staf-tests/stress-tests/testcases/importldif/importldif.xml
@@ -23,7 +23,7 @@
 !
 ! CDDL HEADER END
 !
 !      Copyright 2012 ForgeRock AS.
 !      Copyright 2012-2013 ForgeRock AS.
 ! -->
<stax>
  <defaultcall function="main_importldif" />
@@ -51,10 +51,10 @@
            <call function="'testGroup_Preamble'" />
            <script>
            suiteList = []
            #suiteList.append('basic')
            #suiteList.append('binary_attributes')
            #suiteList.append('properties')
            #suiteList.append('indexes')
            suiteList.append('basic')
            suiteList.append('binary_attributes')
            suiteList.append('properties')
            suiteList.append('indexes')
            suiteList.append('tasks')
            
            def get_testsuite_filename(testsdir,groupname,suitename):