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

Christophe Sovant
07.46.2013 91f46aa2b61f42e8818c7c27291ddacd9ae3809b
CR-1378 Fix tasks/restore_db testcase on Windows and cleanup known issue in tasks testsuite
4 files modified
139 ■■■■ changed files
opends/tests/staf-tests/functional-tests/testcases/tasks/backup_db.xml 17 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/tasks/import-ldif.xml 18 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/tasks/restart_db.xml 60 ●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/tasks/restore_db.xml 44 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/functional-tests/testcases/tasks/backup_db.xml
@@ -24,7 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2007-2009 Sun Microsystems, Inc.
 !      Portions Copyright 2011 ForgeRock AS.
 !      Portions Copyright 2011-2013 ForgeRock AS.
! -->
<stax>
  <defaultcall function="backup_db"/>
@@ -387,7 +387,8 @@
                'dsInstancePswd'      : DIRECTORY_INSTANCE_PSWD,
                'startTask'           : '20061212000000',                   
                'backupDir'           : '%s/tasks/backup_schedule_asynchronous' % remote.temp,
                'backEnd'             : DIRECTORY_INSTANCE_BE}
                'backEnd'             : DIRECTORY_INSTANCE_BE,
                'expectedRC'          : 1 }
              </call>
              
              <script>
@@ -396,9 +397,7 @@
  
              <call function="'searchString'">
                { 'expectedString' : 'The specified start time \'20061212000000\' has already passed' ,
                  'returnString'     : returnString ,
                  'knownIssue'     : '3909' ,
                  'expectedRC'     : '1' }
                  'returnString'   : returnString }
                </call>
              
              
@@ -409,7 +408,7 @@
            <!--- Test Case information
            #@TestMarker      Backup tasks
            #@TestName        Schedule a recurring Backup task with the same name as previously
            #@TestPurpose     Schedule a recurring Backup in task mode with the same name see issue 3373
            #@TestPurpose     Schedule a recurring Backup in task mode with the same name
            #@TestPreamble
            #@TestStep        Create a recurring Backup in task mode with the same name as previously
            #@TestStep        specify the recurringTask option with the value
@@ -560,12 +559,6 @@
                }
              </call>
  
        <!---
              <call function="'setKnownIssue'">
                { 'issueId' : '3773' }
              </call>
        -->
              <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>
opends/tests/staf-tests/functional-tests/testcases/tasks/import-ldif.xml
@@ -24,7 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2007-2010 Sun Microsystems, Inc.
 !      Portions Copyright 2011 ForgeRock AS.
 !      Portions Copyright 2011-2013 ForgeRock AS.
! -->
<stax>
  <defaultcall function="import-ldif"/>
@@ -93,14 +93,6 @@
                }
              </call>
              <if expr="RC != 0">
                <sequence>
                  <call function="'setKnownIssue'">
                    { 'issueId' : 6962694 }
                  </call>
                </sequence>
              </if>
              <!-- Delete entries -->
              <call function="'DeleteEntry'">
                { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
@@ -161,14 +153,6 @@
                }
              </call>
              <if expr="RC != 0">
                <sequence>
                  <call function="'setKnownIssue'">
                    { 'issueId' : 6962694 }
                  </call>
                </sequence>
              </if>
              <!-- Delete entries -->
              <call function="'DeleteEntry'">
                { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
opends/tests/staf-tests/functional-tests/testcases/tasks/restart_db.xml
@@ -24,6 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2007-2009 Sun Microsystems, Inc.
 !      Portions Copyright 2013 ForgeRock AS.
! -->
<stax>
  <defaultcall function="restart_db"/>
@@ -61,7 +62,6 @@
            #@TestPurpose         Schedule a restart in task mode to be executed immedialy in asynchronous mode
            #@TestPreamble
            #@TestStep            Execute a restart in task
            #@TestStep            Specify the -t option with the value non null  to schedule an  execution
            #@TestPostamble
            #@TestResult
            -->
@@ -77,10 +77,14 @@
                'dsAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
                'dsBindDN'    : DIRECTORY_INSTANCE_DN,
                'dsBindPwd'   : DIRECTORY_INSTANCE_PSWD,
                'dsRestart'   : ' ',
                'dsStopTime'  : '20061212000000',
                'knownIssue'  : '3909' ,
                'expectedRC'  : '89'
                'dsRestart'   : ' '
                }
              </call>
              <!--- Check that DS started -->
              <call function="'isAlive'">
               { 'noOfLoops'        : 10 ,
                 'noOfMilliSeconds' : 2000
                }
              </call>
                                     
@@ -95,7 +99,6 @@
            #@TestPurpose         Schedule a stop in task mode to be executed immedialy in asynchronous mode
            #@TestPreamble
            #@TestStep            Execute a stop in task mode
            #@TestStep            Specify the -t option with the value non null to schedule an execution
            #@TestPostamble
            #@TestResult
            -->
@@ -111,9 +114,6 @@
                'dsAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
                'dsBindDN'    : DIRECTORY_INSTANCE_DN,
                'dsBindPwd'   : DIRECTORY_INSTANCE_PSWD,
                'dsStopTime'  : '20061212000000',
                'knownIssue'  : '3909' ,
                'expectedRC'  : '89'
                }
              </call>
           
@@ -144,6 +144,48 @@
            </sequence>
          </testcase>
  
          <!--- Test Case information
            #@TestMarker          Restart tasks
            #@TestName            Restart task in asynchronous mode with date in the past
            #@TestPurpose         Schedule a restart in task mode to be executed in asynchronous mode
                                  with date in the past
            #@TestPreamble
            #@TestStep            Execute a restart in task with date in the past
            #@TestStep            Specify the -t option with date in the past
            #@TestPostamble
            #@TestResult
            -->
          <testcase name="getTestCaseName('schedule restart task for scheduled execution with date in the past')">
            <sequence>
              <call function="'testCase_Preamble'"/>
              <call function="'StopDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME,
                'dsHost'      : DIRECTORY_INSTANCE_HOST,
                'dsAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
                'dsBindDN'    : DIRECTORY_INSTANCE_DN,
                'dsBindPwd'   : DIRECTORY_INSTANCE_PSWD,
                'dsRestart'   : ' ',
                'dsStopTime'  : '20061212000000',
                'expectedRC'  : 89
                }
              </call>
              <script>
                returnString = STAXResult[0][1]
              </script>
              <call function="'checktestString'">
                {'returnString'     : returnString ,
                  'expectedString'  : 'The specified stop time \'20061212000000\' has already passed'
                }
              </call>
              <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>
        </sequence>
        <finally>
          <sequence>
opends/tests/staf-tests/functional-tests/testcases/tasks/restore_db.xml
@@ -24,7 +24,7 @@
 ! CDDL HEADER END
 !
 !      Copyright 2007-2009 Sun Microsystems, Inc.
 !      Portions Copyright 2011 ForgeRock AS.
 !      Portions Copyright 2011-2013 ForgeRock AS.
! -->
<stax>
  <defaultcall function="restore_db"/>
@@ -212,7 +212,7 @@
                import java.text.SimpleDateFormat
  
                cal = java.util.Calendar.getInstance()
                cal.add(java.util.Calendar.SECOND,30)
                cal.add(java.util.Calendar.SECOND,120)
  
                dateFormat = java.text.SimpleDateFormat("yyyyMMddHHmmss")
  
@@ -364,6 +364,46 @@
            </sequence>
          </testcase>
  
          <!--- Test Case information
            #@TestMarker          Restore tasks
            #@TestName            Restore task in asynchronous mode with date in the past
            #@TestPurpose         Schedule a restore in task mode to be executed in asynchronous mode
                                  with date in the past
            #@TestPreamble
            #@TestStep            Execute a restore in task with date in the past
            #@TestStep            Specify the -t option with date in the past
            #@TestPostamble
            #@TestResult
            -->
          <testcase name="getTestCaseName('schedule restart task for scheduled execution with date in the past')">
            <sequence>
              <call function="'testCase_Preamble'"/>
              <call function="'restore'">
                { 'location'          : STAF_REMOTE_HOSTNAME ,
                'dsInstanceHost'      : DIRECTORY_INSTANCE_HOST,
                'dsInstanceAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT,
                'dsInstanceDn'        : DIRECTORY_INSTANCE_DN,
                'dsInstancePswd'      : DIRECTORY_INSTANCE_PSWD,
                'backupDir'           : '%s/tasks/backup_synchronous' % remote.temp,
                'startTask'           : '20061212000000',
                'expectedRC'          : 1 }
              </call>
              <script>
                returnString = STAXResult[0][1]
              </script>
              <call function="'checktestString'">
                {'returnString'     : returnString ,
                  'expectedString'  : 'The specified start time \'20061212000000\' has already passed'
                }
              </call>
              <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>
        </sequence>
        <finally>
          <sequence>