# HARNESS-TIMEOUT-EVENT 5
use strict;
use warnings;

use Test2::V0;
use Test2::API qw/test2_formatter/;

pass("Test Start");

$ENV{T2_HARNESS_JOB_IS_TRY} //= 0;
$ENV{FAIL_ONCE}             //= 0;
$ENV{FAIL_ALWAYS}           //= 0;

diag "JOB_IS_TRY  = $ENV{T2_HARNESS_JOB_IS_TRY}";
diag "FAIL_ONCE   = $ENV{FAIL_ONCE}";
diag "FAIL_ALWAYS = $ENV{FAIL_ALWAYS}";

if ( $ENV{FAIL_ONCE} && $ENV{T2_HARNESS_JOB_IS_TRY} < 1 ) {
	sleep 1 while 1;
}

pass("Final Test");

done_testing();
