Debian Codegraph @

t/integration/retry-timeout/retry.tx

raw
1 # HARNESS-TIMEOUT-EVENT 20
2 # The first try hangs and has to be killed by that timeout, so it is the floor
3 # on how long this test takes. It still has to be long enough that a loaded
4 # machine cannot trip it while perl is loading Test2::V0 on the retry, which is
5 # a stretch of silence this test does not control.
6 use strict;
7 use warnings;
8
9 use Test2::V0;
10 use Test2::API qw/test2_formatter/;
11
12 pass("Test Start");
13
14 $ENV{T2_HARNESS_JOB_IS_TRY} //= 0;
15 $ENV{FAIL_ONCE} //= 0;
16 $ENV{FAIL_ALWAYS} //= 0;
17
18 diag "JOB_IS_TRY = $ENV{T2_HARNESS_JOB_IS_TRY}";
19 diag "FAIL_ONCE = $ENV{FAIL_ONCE}";
20 diag "FAIL_ALWAYS = $ENV{FAIL_ALWAYS}";
21
22 if ( $ENV{FAIL_ONCE} && $ENV{T2_HARNESS_JOB_IS_TRY} < 1 ) {
23 sleep 1 while 1;
24 }
25
26 pass("Final Test");
27
28 done_testing();