[Rt-commit] [rtir] 01/01: Instead of printing to a pipe, have MySQL source

Alex Vandiver alexmv at bestpractical.com
Wed Mar 25 13:09:19 EDT 2015


This is an automated email from the git hooks/post-receive script.

alexmv pushed a commit to branch 3.0/source-from-file
in repository rtir.

commit 6cc40aaf0ac2c9dccf3667e2e4610103ac50cebe
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Mar 25 13:08:56 2015 -0400

    Instead of printing to a pipe, have MySQL source
    
    Printing to a pipe can lead to unreliable test failures if it overfills.
---
 lib/RT/IR/Test.pm.in | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/RT/IR/Test.pm.in b/lib/RT/IR/Test.pm.in
index c929f3e..e806f63 100644
--- a/lib/RT/IR/Test.pm.in
+++ b/lib/RT/IR/Test.pm.in
@@ -126,14 +126,13 @@ sub import_snapshot {
             push @args, '--password='. $ENV{'RT_DBA_PASSWORD'}
         }
         push @args, RT->Config->Get('DatabaseName');
+        push @args, "-e", "source t/data/snapshot/$db_type/$file";
         my $cmd = $ENV{'RT_TEST_MYSQL_CLIENT'} || 'mysql';
 
         Test::More::diag("About to run `". join(' ', $cmd, @args) ."`");
 
-        open my $fh, "|-", $cmd, @args
+        !system($cmd, @args)
             or die "couldn't run mysql: $!";
-        print $fh $self->file_content( ['t','data', 'snapshot', $db_type, $file] );
-        close $fh;
 
         RT::Test::__reconnect_rt();
     } else {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list