Merge trunk r487.

This commit is contained in:
Daniel Nichter
2012-12-07 11:52:33 -07:00
68 changed files with 7739 additions and 156 deletions

View File

@@ -22,8 +22,8 @@ use POSIX qw(mkfifo);
my $pid_file = '/tmp/mqd.pid';
my $fifo = '/tmp/mqd.fifo';
unlink $pid_file if $pid_file;
unlink $fifo if $fifo;
unlink $pid_file if -f $pid_file;
unlink $fifo if -f $fifo;
my ($start, $end, $waited, $timeout);
SKIP: {
@@ -53,7 +53,7 @@ SKIP: {
);
}
unlink $pid_file if $pid_file;
unlink $pid_file if -f $pid_file;
mkfifo $fifo, 0700;
system("$trunk/t/pt-query-digest/samples/write-to-fifo.pl $fifo 4 &");
@@ -67,7 +67,7 @@ $timeout = wait_for(
);
$end = time;
$waited = $end - $start;
if ( $timeout && $pid_file ) {
if ( $timeout && -f $pid_file ) {
# mqd ran longer than --read-timeout
chomp(my $pid = slurp_file($pid_file));
kill SIGTERM => $pid if $pid;
@@ -75,11 +75,11 @@ if ( $timeout && $pid_file ) {
ok(
$waited >= 2 && int($waited) <= 4,
sprintf("--read-timeout waited %.1f seconds reading a file", $waited)
sprintf("--read-timeout 2 waited %.1f seconds reading a file", $waited)
);
unlink $pid_file if $pid_file;
unlink $fifo if $fifo;
unlink $pid_file if -f $pid_file;
unlink $fifo if -f $fifo;
# #############################################################################
# Done.