From e431b94b79f2995119aa31424e0750d8d2e19896 Mon Sep 17 00:00:00 2001
From: Christophe Sovant <christophe.sovant@forgerock.com>
Date: Mon, 10 Jun 2013 21:30:13 +0000
Subject: [PATCH] CR-1828 Updated import_ldif and operations stress tests
---
opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif.xml | 15 ++++---
opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_many_thrds.xml | 12 +++--
opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/importldif/importldif.xml | 10 ++--
opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_large_import_buffer.xml | 11 +++--
opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_out-of-box.xml | 6 ++-
opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_bin_attr_10m.xml | 2
opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_low_index_entry_limit.xml | 10 +++--
opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_many_indexes.xml | 10 +++--
opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr_with_load.xml | 9 +++-
opendj-sdk/opends/tests/staf-tests/shared/ant/build.properties | 1
opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr.xml | 10 +++--
opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml | 2
opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_bin_attr_6m.xml | 3 +
opendj-sdk/opends/tests/staf-tests/shared/tests/config.py.stubs | 2
opendj-sdk/opends/tests/staf-tests/shared/functions/sdk.xml | 14 +++---
15 files changed, 69 insertions(+), 48 deletions(-)
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/ant/build.properties b/opendj-sdk/opends/tests/staf-tests/shared/ant/build.properties
index 90d22e3..761f825 100644
--- a/opendj-sdk/opends/tests/staf-tests/shared/ant/build.properties
+++ b/opendj-sdk/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
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/functions/sdk.xml b/opendj-sdk/opends/tests/staf-tests/shared/functions/sdk.xml
index dfdf676..10e19af 100644
--- a/opendj-sdk/opends/tests/staf-tests/shared/functions/sdk.xml
+++ b/opendj-sdk/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'">
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml b/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml
index 59359ff..7857372 100755
--- a/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml
+++ b/opendj-sdk/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)
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/tests/config.py.stubs b/opendj-sdk/opends/tests/staf-tests/shared/tests/config.py.stubs
index 8599d1b..cf74b93 100644
--- a/opendj-sdk/opends/tests/staf-tests/shared/tests/config.py.stubs
+++ b/opendj-sdk/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}'
diff --git a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif.xml b/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif.xml
index 7e37b85..7cc9d2c 100755
--- a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif.xml
+++ b/opendj-sdk/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">
diff --git a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_bin_attr_10m.xml b/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_bin_attr_10m.xml
index 2be97f9..10b1ce5 100644
--- a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_bin_attr_10m.xml
+++ b/opendj-sdk/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'"/>
diff --git a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_bin_attr_6m.xml b/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_bin_attr_6m.xml
index 06ad0a6..cb85e9b 100644
--- a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_bin_attr_6m.xml
+++ b/opendj-sdk/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'"/>
diff --git a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_large_import_buffer.xml b/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_large_import_buffer.xml
index 89236fd..aecf7d2 100755
--- a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_large_import_buffer.xml
+++ b/opendj-sdk/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'"/>
diff --git a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_low_index_entry_limit.xml b/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_low_index_entry_limit.xml
index 9924147..f19299b 100755
--- a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_low_index_entry_limit.xml
+++ b/opendj-sdk/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'"/>
diff --git a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_many_indexes.xml b/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_many_indexes.xml
index 3e0948d..b9afbcc 100755
--- a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_many_indexes.xml
+++ b/opendj-sdk/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'"/>
diff --git a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_many_thrds.xml b/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_many_thrds.xml
index 37a34d7..4f5d816 100755
--- a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_many_thrds.xml
+++ b/opendj-sdk/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'"/>
diff --git a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_out-of-box.xml b/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_out-of-box.xml
index 731fc97..dadc1e2 100755
--- a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_out-of-box.xml
+++ b/opendj-sdk/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'"/>
diff --git a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr.xml b/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr.xml
index 677e125..dd270ac 100755
--- a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr.xml
+++ b/opendj-sdk/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'"/>
diff --git a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr_with_load.xml b/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr_with_load.xml
index d34f10b..d51e04a 100755
--- a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr_with_load.xml
+++ b/opendj-sdk/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'"/>
diff --git a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/importldif/importldif.xml b/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/importldif/importldif.xml
index 9324f5a..4ada5c6 100644
--- a/opendj-sdk/opends/tests/staf-tests/stress-tests/testcases/importldif/importldif.xml
+++ b/opendj-sdk/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):
--
Gitblit v1.10.0