The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::Retry - Retry test functions on failure

SYNOPSIS

use Test::Retry;

# Retries for 5 times with 0.5 secs delay each
retry_test {
    is func_with_some_random_lag(), $expected;
};

# or override existing test functions

BEGIN { Test::Retry->override('is') }

is { func_with_some_random_lag(), $expected };

DESCRIPTION

Test::Retry provides feature to retry code until a test succeeds (with retry limits).

Useful for tests which involves I/O and requires some wait to pass, for example.

IMPORTING

Test::Retry exports one function, namely retry_test.

Options below are available when you use this module:

FUNCTIONS/METHODS

AUTHOR

motemen motemen@gmail.com

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.