[Rt-commit] r5251 - RT-Extension-CommandByEmail/t

ruz at bestpractical.com ruz at bestpractical.com
Thu May 18 18:13:59 EDT 2006


Author: ruz
Date: Thu May 18 18:13:56 2006
New Revision: 5251

Modified:
   RT-Extension-CommandByEmail/t/utils.pl

Log:
* flush cache after each run of mailgate
* report text when we couldn't find id of a ticket in mailgate results

Modified: RT-Extension-CommandByEmail/t/utils.pl
==============================================================================
--- RT-Extension-CommandByEmail/t/utils.pl	(original)
+++ RT-Extension-CommandByEmail/t/utils.pl	Thu May 18 18:13:56 2006
@@ -31,6 +31,8 @@
               ." --action $args{'action'}"
               ." 2>&1";
 
+    DBIx::SearchBuilder::Record::Cachable->FlushCache;
+
     my ($child_out, $child_in);
     my $pid = open2($child_out, $child_in, $cmd);
     print $child_in $args{'message'};
@@ -43,6 +45,9 @@
     my $message = shift;
     my $gate_result = run_gate( message => $message );
     $gate_result =~ /Ticket: (\d+)/;
+    unless ( $1 ) {
+        print STDERR "Couldn't find ticket id in text:\n$gate_result";
+    }
     return $1;
 }
 


More information about the Rt-commit mailing list