Skip to content

Commit a5e3dee

Browse files
committed
Test that jobs end up in queue.
1 parent 30ef908 commit a5e3dee

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

lib/MetaCPAN/Queue.pm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ sub startup {
3737

3838
# Runner expects to have been called via CLI
3939
local @ARGV = @args;
40-
use DDP;
41-
p @ARGV;
4240
try {
4341
my $release = MetaCPAN::Script::Runner->run(@args);
4442
}

lib/MetaCPAN/Script/Queue.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ has _minion => (
2626
is => 'ro',
2727
isa => 'Minion',
2828
lazy => 1,
29-
handles => { _add_to_queue => 'enqueue' },
29+
handles => { _add_to_queue => 'enqueue', stats => 'stats', },
3030
default => sub { MetaCPAN::Queue->new->minion },
3131
);
3232

t/script/queue.t

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ use MetaCPAN::Script::Queue;
99
my $config = MetaCPAN::Script::Runner::build_config;
1010
local @ARGV = ( '--dir', $config->{cpan} );
1111

12-
use DDP;
13-
diag np $config;
14-
1512
my $queue = MetaCPAN::Script::Queue->new_with_options($config);
1613
$queue->run;
17-
ok('does not die');
14+
15+
is( $queue->stats->{inactive_jobs},
16+
52, '52 files added to queue for indexing' );
1817

1918
done_testing();

0 commit comments

Comments
 (0)