AnyEvent-Gearman-WorkerPool

 view release on metacpan or  search on metacpan

t/02-Slot.t  view on Meta::CPAN

package main;

use lib qw( lib t/lib );
use Test::More tests=>3;
use Log::Log4perl qw(:easy);
# Log::Log4perl->easy_init($DEBUG);
use Gear;
use AnyEvent;
use AnyEvent::Gearman;
use AnyEvent::Gearman::WorkerPool::Slot;
use Scalar::Util qw(weaken);
my $port = '9955';
my @js = ("localhost:$port");
my $cv = AE::cv;

my $t = AE::timer 10,0,sub{ $cv->send('timeout')};

use_ok('Gearman::Server');
gstart($port);

my $slot = AnyEvent::Gearman::WorkerPool::Slot->new(

t/03-SlotOverwork.t  view on Meta::CPAN


use lib qw( lib t/lib);
use Test::More tests=>5;

use Log::Log4perl qw(:easy);
# Log::Log4perl->easy_init($DEBUG);
use Gear;
use AnyEvent;
use AnyEvent::Gearman;
use AnyEvent::Gearman::WorkerPool::Slot;
use Scalar::Util qw(weaken);

my $port = '9955';
my @js = ("localhost:$port");
my $cv = AE::cv;

my $t = AE::timer 15,0,sub{ $cv->send('timeout')};

use_ok('Gearman::Server');
gstart($port);

t/04-SlotManager.t  view on Meta::CPAN

package main;

use lib qw( lib t/lib );
use Test::More tests=>2;
use Gear;
use AnyEvent;
use AnyEvent::Gearman;
use AnyEvent::Gearman::WorkerPool;

use Scalar::Util qw(weaken);
my $port = '9955';
my @js = ("localhost:$port");
my $cv = AE::cv;

my $t = AE::timer 10,0,sub{ $cv->send('timeout')};

use_ok('Gearman::Server');
gstart($port);

my $slotman = AnyEvent::Gearman::WorkerPool->new(

t/05-SlotManagerWork.t  view on Meta::CPAN

use Test::More tests=>12;
use Gear;
use AnyEvent;
use AnyEvent::Gearman;
use AnyEvent::Gearman::Client;
use AnyEvent::Gearman::WorkerPool;
use Log::Log4perl qw(:easy);
# Log::Log4perl->easy_init($DEBUG);


use Scalar::Util qw(weaken);
my $port = '9955';
my @js = ("localhost:$port");

use_ok('Gearman::Server');
gstart($port);

my $cv = AE::cv;

my $sig = AE::signal 'INT'=> sub{ 
DEBUG "TERM!!";



( run in 0.411 second using v1.01-cache-2.11-cpan-65fba6d93b7 )