reconnect to redis if the connection went away
[perl-Redis.git] / t / 20-Redis-Hash.t
index 7bd9daf..785ac10 100755 (executable)
@@ -3,9 +3,8 @@
 use warnings;
 use strict;
 
-use Test::More tests => 7;
+use Test::More tests => 8;
 use lib 'lib';
-use Data::Dump qw/dump/;
 
 BEGIN {
        use_ok( 'Redis::Hash' );
@@ -19,12 +18,12 @@ $o->CLEAR();
 
 ok( ! keys %h, 'empty' );
 
+my $commands_processed_before = $o->info->{total_commands_processed};
+
 ok( %h = ( 'foo' => 42, 'bar' => 1, 'baz' => 99 ), '=' );
 
 is_deeply( [ sort keys %h ], [ 'bar', 'baz', 'foo' ], 'keys' );
 
 is_deeply( \%h, { bar => 1, baz => 99, foo => 42, }, 'structure' );
 
-
-#diag dump( \%h );
-
+ok( $commands_processed_before < $o->info->{total_commands_processed}, 'more processed commands than before' );