Gearman-Driver

 view release on metacpan or  search on metacpan

t/011-attribute-parser.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More tests => 28;
use Test::Differences;
use FindBin;
use lib "$FindBin::Bin/lib";
use Gearman::Driver::Worker::AttributeParser;
use Moose::Util qw(apply_all_roles);
use Gearman::Driver::Test::Live::BeginEnd;
use Gearman::Driver::Test::Live::Console;
use Gearman::Driver::Test::Live::DefaultAttributes;
use Gearman::Driver::Test::Live::EncodeDecode;
use Gearman::Driver::Test::Live::MaxIdleTime;
use Gearman::Driver::Test::Live::OverrideAttributes;
use Gearman::Driver::Test::Live::Prefix;
use Gearman::Driver::Test::Live::ProcessGroup;
use Gearman::Driver::Test::Live::Quit;
use Gearman::Driver::Test::Live::WithBaseClass;

my %expected = (
    'Gearman::Driver::Test::Live::BeginEnd' => {
        'job1' => {
            'Job'          => 1,
            'ProcessGroup' => 'group1'
        },
        'job2' => {
            'Job'          => 1,
            'ProcessGroup' => 'group1'
        },
    },

    'Gearman::Driver::Test::Live::Console' => {
        'ping' => {
            'Job'          => 1,
            'MinProcesses' => '0',
            'MaxProcesses' => '1'
        },
        'pong' => {
            'Job'          => 1,
            'MinProcesses' => '0',
            'MaxProcesses' => '1'
        },
    },

    'Gearman::Driver::Test::Live::DefaultAttributes' => {
        'job1' => {
            'Decode'       => 'dec',
            'Encode'       => 'enc',
            'Job'          => 1,
            'ProcessGroup' => 'group1',
        },
        'job2' => {
            'Decode'       => 'dec',
            'Encode'       => 'enc',
            'Job'          => 1,
            'ProcessGroup' => 'group1',
        },
        'job3' => {
            'Decode'       => 'dec',
            'Encode'       => 'enc',
            'Job'          => 1,
            'ProcessGroup' => 'group1',
        },
        'job4' => {



( run in 0.771 second using v1.01-cache-2.11-cpan-39bf76dae61 )