jmx4perl/it/t/59_check_timeout.t

23 lines
504 B
Perl
Raw Normal View History

2017-10-31 14:38:28 +01:00
use FindBin;
use strict;
use warnings;
use Test::More qw(no_plan);
use Data::Dumper;
use JMX::Jmx4Perl::Alias;
use It;
require "check_jmx4perl/base.pl";
my $jmx = It->new(verbose=>1)->jmx4perl;
my ($ret,$content);
my $time = time;
($ret,$content) = exec_check_perl4jmx("--mbean jolokia.it:type=operation --operation sleep --timeout 1 -c 1 2");
# print Dumper($ret,$content);
# print "Time ",time - $time,"\n";
ok($content =~ /timeout/i,"Timeout reached");
is($ret,3,"UNKNOWN status for timeouts");