Created
September 7, 2012 23:26
-
-
Save jzawodn/3670704 to your computer and use it in GitHub Desktop.
Testing for leaks in AnyEvent::Redis::Federated with the poll() call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use lib ('../lib','./lib'); | |
use Test::More tests => 1; | |
use AnyEvent::Redis::Federated; | |
my %config = ( | |
'nodes' => { | |
redis_0 => { address => 'localhost:63790' }, | |
}, | |
); | |
# new client | |
my $redis = new AnyEvent::Redis::Federated( | |
config => \%config, | |
tag => 'default', | |
debug => 0, | |
); | |
ok($redis); | |
my $count = 0; | |
while (1) { | |
$redis->set("foo", "bar"); | |
$redis->poll; | |
$count++; | |
} | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment