From 7fb9f3d5a7a6d9961c5c58268b11a4fff4cedd44 Mon Sep 17 00:00:00 2001
From: Christophe Sovant <christophe.sovant@forgerock.com>
Date: Mon, 19 Aug 2013 14:16:00 +0000
Subject: [PATCH] - Fix STAX exception in replication/externalchangelog_consistency tests due to unknown function paramter - Added README to explain how to start the STAF daemon and run the tests

---
 opends/tests/staf-tests/functional-tests/testcases/replication/externalchangelog/externalchangelog_consistency_tests.xml |   15 ++++++++++++++-
 opends/tests/staf-tests/README                                                                                           |   25 +++++++++++++++++++++++++
 opends/tests/staf-tests/functional-tests/testcases/tasks/restore_db.xml                                                  |    2 +-
 3 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/opends/tests/staf-tests/README b/opends/tests/staf-tests/README
new file mode 100644
index 0000000..ba605aa
--- /dev/null
+++ b/opends/tests/staf-tests/README
@@ -0,0 +1,25 @@
+[1] Prepare run
+
+$ ./build tests-configure
+
+=> for the question "Enter java home", the default value is a jre, in some tests we use javac so to avoid 
+some errors during the tests enter a path to a jdk
+
+After running this command the following file is created: functional-tests-<hostname>.properties
+
+=> if you want to change the list of tests to be executed, edit this file and update the variable: test.plan.custom
+for instance: test.plan.custom=replication,core
+
+[2] Running the tests
+
+$ ./build tests-run
+
+[3] Monitoring the tests
+
+$ ./build staf-gui
+
+or
+
+in your browser open the following file: 
+<log_dir>/<hostname>-<timestamp>/reports/results_tmp.xml
+
diff --git a/opends/tests/staf-tests/functional-tests/testcases/replication/externalchangelog/externalchangelog_consistency_tests.xml b/opends/tests/staf-tests/functional-tests/testcases/replication/externalchangelog/externalchangelog_consistency_tests.xml
index 11ea729..dfed53f 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/replication/externalchangelog/externalchangelog_consistency_tests.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/replication/externalchangelog/externalchangelog_consistency_tests.xml
@@ -403,6 +403,10 @@
       <function-optional-arg name="label" default="''">
         Friendly label to aid description
       </function-optional-arg>
+      
+      <function-optional-arg name="knownIssue" default="None">
+        Issue id. Corresponds to an issue number.
+      </function-optional-arg>
     </function-map-args>
 
     <sequence>
@@ -423,8 +427,17 @@
           </sequence>
         <else>
           <sequence>
+            <if expr="knownIssue == None">
+              <tcstatus result="'fail'"/>
+              <else>
+                <sequence>
+                  <call function="'setKnownIssue'">
+                    { 'issueId' : knownIssue }
+                  </call>
+                </sequence>
+              </else>
+            </if>
             <message level="'error'">'%s Items do not match (%s)' % (label,items)</message>
-            <tcstatus result="'fail'"/>
           </sequence>
         </else>
       </if>
diff --git a/opends/tests/staf-tests/functional-tests/testcases/tasks/restore_db.xml b/opends/tests/staf-tests/functional-tests/testcases/tasks/restore_db.xml
index c03d7eb..164d499 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/tasks/restore_db.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/tasks/restore_db.xml
@@ -212,7 +212,7 @@
                 import java.text.SimpleDateFormat
   
                 cal = java.util.Calendar.getInstance()
-                cal.add(java.util.Calendar.SECOND,240)
+                cal.add(java.util.Calendar.SECOND,600)
   
                 dateFormat = java.text.SimpleDateFormat("yyyyMMddHHmmss")
   

--
Gitblit v1.10.0