Fix tests broken by the previous commit

This commit is contained in:
Brian Fraser
2013-02-26 12:03:12 -03:00
parent 8e449a1c83
commit 934709abad
2 changed files with 5 additions and 38 deletions

View File

@@ -47,11 +47,11 @@ is( "$fh", '*main::STDIN', 'Got STDIN for "-"' );
# #############################################################################
# Real filenames.
# #############################################################################
$next_fh = $fi->get_file_itr("$sample/memcached/memc_tcpdump009.txt", "$sample/empty");
$next_fh = $fi->get_file_itr("$sample/slowlogs/slow002.txt", "$sample/empty");
( $fh, $name, $size ) = $next_fh->();
is( ref $fh, 'GLOB', 'Open filehandle' );
is( $name, "$sample/memcached/memc_tcpdump009.txt", "Got filename for $name");
is( $size, 587, "Got size for $name");
is( $name, "$sample/slowlogs/slow002.txt", "Got filename for $name");
is( $size, 3841, "Got size for $name");
( $fh, $name, $size ) = $next_fh->();
is( $name, "$sample/empty", "Got filename for $name");
is( $size, 0, "Got size for $name");

View File

@@ -9,7 +9,7 @@ BEGIN {
use strict;
use warnings FATAL => 'all';
use English qw(-no_match_vars);
use Test::More tests => 7;
use Test::More;
use TcpdumpParser;
use PerconaTest;
@@ -149,40 +149,6 @@ is(
'Sets oktorun'
);
# #############################################################################
# Issue 544: memcached parse error: Use of uninitialized value in pattern match
# #############################################################################
# This issue is caused by having extra info in the tcpdump output.
test_packet_parser(
parser => $p,
file => "t/lib/samples/memcached/memc_tcpdump013.txt",
desc => 'verbose tcpdump output with ascii dump',
result =>
[
{ ts => '2009-08-03 19:56:37.683157',
ack => '1391934401',
seq => '1393769400',
src_host => '75.126.27.210',
src_port => '42819',
dst_host => '75.126.27.210',
dst_port => '11211',
complete => 1,
pos_in_log => 0,
ip_hlen => 5,
tcp_hlen => 5,
dgram_len => 66,
data_len => 26,
syn => 0,
fin => 0,
rst => 0,
data => join('', qw(
6765 7420 323a 6f70 7469 6f6e 733a 616c 6c6f 7074 696f 6e73 0d0a
)),
},
],
);
# #############################################################################
# Issue 564: mk-query-digest --type tcpdump|memcached crashes on empty input
# #############################################################################
@@ -242,3 +208,4 @@ like(
'_d() works'
);
done_testing;