Permalink
Browse files

Update error message expectation in test

  • Loading branch information...
plu committed May 19, 2010
1 parent d7739ea commit 6108bcef02cf5c6d0c57731ac7df514d3b959153
Showing with 19 additions and 12 deletions.
  1. +16 −9 README
  2. +3 −3 t/01-validate.t
View
25 README
@@ -43,12 +43,17 @@ METHODS
This can be one of the following Gearman::XS::Client methods:
- * "do"
- * "do_high"
- * "do_low"
- * "do_background"
- * "do_high_background"
- * "do_low_background"
+ * "do"
+
+ * "do_high"
+
+ * "do_low"
+
+ * "do_background"
+
+ * "do_high_background"
+
+ * "do_low_background"
log
Takes one argument:
@@ -74,9 +79,11 @@ COPYRIGHT AND LICENSE
under the same terms as Perl itself.
SEE ALSO
- * Log::Handler
- * Gearman::XS::Client
- * <http://www.gearman.org/>
+ * Log::Handler
+
+ * Gearman::XS::Client
+
+ * <http://www.gearman.org/>
REPOSITORY
<http://github.com/plu/log-handler-output-gearman/>
View
@@ -34,7 +34,7 @@ qr/The 'servers' parameter \("invalid"\) to Log::Handler::Output::Gearman::.*? w
worker => 'logger',
);
$logger->log('test');
- like( $logger->errstr(), qr/gearman_con_flush:could not connect/, 'Cant connect to Gearman #1' );
+ like( $logger->errstr(), qr/gearman_con(nection)*_flush:could not connect/, 'Cant connect to Gearman #1' );
}
{
@@ -53,14 +53,14 @@ qr/The 'servers' parameter \("invalid"\) to Log::Handler::Output::Gearman::.*? w
unless ($logger->critical('test123')) {
$error = $logger->errstr();
}
- like( $logger->errstr(), qr/gearman_con_flush:could not connect/, 'Cant connect to Gearman #2' );
+ like( $logger->errstr(), qr/gearman_con(nection)*_flush:could not connect/, 'Cant connect to Gearman #2' );
my $dying_logger = Log::Handler->new();
$handler_options{die_on_errors} = 1;
$dying_logger->add(gearman => \%handler_options);
eval {
$dying_logger->critical('test123');
};
- like( $@, qr/Log::Handler::Output: gearman_con_flush:could not connect/, 'Cant connec to Gearman #3 (die)');
+ like( $@, qr/Log::Handler::Output: gearman_con(nection)*_flush:could not connect/, 'Cant connec to Gearman #3 (die)');
}

0 comments on commit 6108bce

Please sign in to comment.