<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
<!--
! CDDL HEADER START
!
! The contents of this file are subject to the terms of the
! Common Development and Distribution License, Version 1.0 only
! (the "License"). You may not use this file except in compliance
! with the License.
!
! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
! or http://forgerock.org/license/CDDLv1.0.html.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! When distributing Covered Code, include this CDDL HEADER in each
! file and include the License file at legal-notices/CDDLv1_0.txt.
! If applicable, add the following below this CDDL HEADER, with the
! fields enclosed by brackets "[]" replaced with your own identifying
! information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CDDL HEADER END
!
! Copyright 2013 ForgeRock AS.
! -->
<stax>
<defaultcall function="replication_externalchangelog_consistency"/>
<function name="replication_externalchangelog_consistency">
<sequence>
<!-- Do not run the tests if servers are split, as it is not supported
! by External Changelog to have RS separated from DS -->
<if expr="globalSplitServers == True">
<sequence>
<message>'External changelog not supported in replication split servers mode.'</message>
<message>'This test suite will not be run for this reason.'</message>
<return>0</return>
</sequence>
</if>
<block name="'externalchangelog_consistency'">
<try>
<sequence>
<script>
if not CurrentTestPath.has_key('group'):
CurrentTestPath['group']='replication'
CurrentTestPath['suite']='externalchangelog_consistency'
_suite = 'externalchangelog_consistency'
_groupdir='%s/testcases/replication' % TESTS_DIR
</script>
<call function="'testSuite_Preamble'"/>
<try>
<sequence>
<!--- Test Suite information
#@TestSuiteName Replication External Changelog Tests
#@TestSuitePurpose Test the event notification system provided by
the External Changelog.
#@TestSuiteID External Changelog Tests
#@TestSuiteGroup External Changelog
#@TestGroup Replication
#@TestScript replication_externalchangelog.xml
#@TestHTMLLink http://opends.dev.java.net/
-->
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/replication/replication_setup.xml'
% (TESTS_DIR)"/>
<call function="'replication_setup'"/>
<!-- List of Import of Test Functions -->
<script>
importList=[]
importList.append('externalchangelog_consistency/externalchangelog_consistency_tests')
</script>
<!-- Import the files for this test suite -->
<iterate var="__import" in="importList">
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/%s.xml' % (_groupdir,__import)"/>
</iterate>
<!-- List of Test Cases -->
<script>
ecl_purge_delay = '240'
# Globals for cookies, changenumbers, lastchangenumbers
global_cookiesList=STAXGlobal([])
global_cnsList=STAXGlobal([])
global_lcnsList=STAXGlobal([])
# List of tests to run
testsList=[]
testsList.append('ecl_setup')
testsList.append('ecl_add_cookies_001')
testsList.append('ecl_changenumbers_001')
testsList.append('ecl_mod_cookies_001')
testsList.append('ecl_changenumbers_002')
testsList.append('ecl_draft_cookies_001')
testsList.append('ecl_cookies_001')
testsList.append('ecl_draft_changenumbers_001')
testsList.append('ecl_cookies_002')
testsList.append('ecl_draft_changenumbers_002')
testsList.append('ecl_cookies_003')
testsList.append('ecl_draft_changenumbers_003')
testsList.append('ecl_purge_sleep_001')
testsList.append('ecl_purge_001')
testsList.append('ecl_purge_002')
testsList.append('ecl_purge_003')
testsList.append('ecl_purge_004')
testsList.append('ecl_purge_005')
testsList.append('ecl_cleanup')
</script>
<!-- Execute the Tests -->
<iterate var="__test" in="testsList">
<sequence>
<call function="'%s' % (__test)" />
</sequence>
</iterate>
</sequence>
<catch exception="'STAFException.TestSuite.SetupException'">
<sequence>
<message log="1" level="'fatal'">
'Setup of test suite failed.'
</message>
<rethrow/>
</sequence>
</catch>
<finally>
<message>'Test Cases Completed.'</message>
</finally>
</try>
</sequence>
<finally>
<sequence>
<!-- Test Suite Cleanup -->
<message>'Finally: Replication Cleanup.'</message>
<try>
<sequence>
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/replication/replication_cleanup.xml'
% (TESTS_DIR)"/>
<call function="'replication_cleanup'" />
</sequence>
<catch exception="'STAFException'">
<sequence>
<message log="1" level="'fatal'">'Cleanup of test suite failed.'</message>
</sequence>
</catch>
<finally>
<call function="'testSuite_Postamble'"/>
</finally>
</try>
</sequence>
</finally>
</try>
</block>
</sequence>
</function>
</stax>