mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-09 18:30:16 +00:00
Conditionalize IO::Uncompress::Inflate test. Make test names shorter, uniform.
This commit is contained in:
@@ -324,17 +324,18 @@ sub test_log_parser {
|
||||
close $fh;
|
||||
};
|
||||
|
||||
my ($base_file_name) = $args{file} =~ m/([^\/]+)$/;
|
||||
is(
|
||||
$EVAL_ERROR,
|
||||
'',
|
||||
"No error on $args{file}"
|
||||
"$base_file_name: no errors"
|
||||
);
|
||||
|
||||
if ( defined $args{result} ) {
|
||||
is_deeply(
|
||||
\@e,
|
||||
$args{result},
|
||||
$args{file}
|
||||
"$base_file_name: results"
|
||||
) or print "Got: ", Dumper(\@e);
|
||||
}
|
||||
|
||||
@@ -342,7 +343,7 @@ sub test_log_parser {
|
||||
is(
|
||||
scalar @e,
|
||||
$args{num_events},
|
||||
"$args{file} num_events"
|
||||
"$base_file_name: $args{num_events} events"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -380,17 +381,18 @@ sub test_protocol_parser {
|
||||
close $fh;
|
||||
};
|
||||
|
||||
my ($base_file_name) = $args{file} =~ m/([^\/]+)$/;
|
||||
is(
|
||||
$EVAL_ERROR,
|
||||
'',
|
||||
"No error on $args{file}"
|
||||
"$base_file_name: no errors"
|
||||
);
|
||||
|
||||
if ( defined $args{result} ) {
|
||||
is_deeply(
|
||||
\@e,
|
||||
$args{result},
|
||||
$args{file} . ($args{desc} ? ": $args{desc}" : '')
|
||||
"$base_file_name: " . ($args{desc} || "results")
|
||||
) or print "Got: ", Dumper(\@e);
|
||||
}
|
||||
|
||||
@@ -398,7 +400,7 @@ sub test_protocol_parser {
|
||||
is(
|
||||
scalar @e,
|
||||
$args{num_events},
|
||||
"$args{file} num_events"
|
||||
"$base_file_name: $args{num_events} events"
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -15,7 +15,7 @@ use MySQLProtocolParser;
|
||||
use TcpdumpParser;
|
||||
use PerconaTest;
|
||||
|
||||
my $sample = "t/lib/samples/tcpdump/";
|
||||
my $sample = "t/lib/samples/tcpdump";
|
||||
my $tcpdump = new TcpdumpParser();
|
||||
my $protocol; # Create a new MySQLProtocolParser for each test.
|
||||
|
||||
@@ -487,6 +487,10 @@ test_protocol_parser(
|
||||
],
|
||||
);
|
||||
|
||||
eval { require IO::Uncompress::Inflate; };
|
||||
SKIP: {
|
||||
skip "IO::Uncompress::Inflate not installed", 2 if $EVAL_ERROR;
|
||||
|
||||
# Check data decompression.
|
||||
$protocol = new MySQLProtocolParser(
|
||||
server => '127.0.0.1',
|
||||
@@ -557,9 +561,9 @@ test_protocol_parser(
|
||||
},
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
# TCP retransmission.
|
||||
# Check data decompression.
|
||||
$protocol = new MySQLProtocolParser(
|
||||
server => '10.55.200.15',
|
||||
);
|
||||
|
@@ -15,7 +15,7 @@ use SlowLogParser;
|
||||
use PerconaTest;
|
||||
|
||||
my $p = new SlowLogParser;
|
||||
my $sample = "t/lib/samples/slowlogs/";
|
||||
my $sample = "t/lib/samples/slowlogs";
|
||||
|
||||
# Check that I can parse a slow log in the default slow log format.
|
||||
test_log_parser(
|
||||
|
Reference in New Issue
Block a user