<?xml version="1.0"?>
<!-- 
============================================================================ 
Name        : test_retrytask.ant.xml 
Part of     : Helium AntLib

Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
This component and the accompanying materials are made available
under the terms of the License "Eclipse Public License v1.0"
which accompanies this distribution, and is available
at the URL "http://www.eclipse.org/legal/epl-v10.html".

Initial Contributors:
Nokia Corporation - initial contribution.

Contributors:

Description:

============================================================================
-->
<project name="test-retrytask" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
    <description>Helium antlib core ldap tests.</description>

    <typedef name="retry" classname="com.nokia.helium.core.ant.taskdefs.RetryTask"/>
    <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
    
    <target name="test-retry-task-case-retrycount-set">
        <au:expectfailure expectedMessage="Task [fail] failed after [2] attempts; giving up.">
            <hlm:retry retryCount="2">
                <fail message="Test Retry....."/>
            </hlm:retry>
        </au:expectfailure>    
    </target>
    
    <target name="test-retry-task-case-multiple-sequential-task">
        <au:expectfailure expectedMessage="The retry task container accepts a single nested task (which may be a sequential task container)">
            <hlm:retry sleepTime="2">
                <echo>Sleeping....</echo>
                <echo>Sleeping....</echo>
            </hlm:retry>
        </au:expectfailure>
    </target>

    <target name="test-retry-task-case-no-task">
        <au:expectfailure expectedMessage="The nested retry task not defined">
            <hlm:retry/>
        </au:expectfailure>
    </target>
    
</project>