X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fipc.t;h=51e347c68860fa5e1819358bac499e574ac36d5a;hb=e27b5b1f60b575de4311d550773112e36685e0cb;hp=f09f76ef740434b8b02c35a5640c890a91e5a127;hpb=e82347d7990694c958a3d66ff8ca25b0b26560a3;p=public-inbox.git diff --git a/t/ipc.t b/t/ipc.t index f09f76ef..51e347c6 100644 --- a/t/ipc.t +++ b/t/ipc.t @@ -168,4 +168,13 @@ like($warn[0], qr/ wq_do: /, '1st warned from wq_do'); like($warn[1], qr/ wq_worker: /, '2nd warned from wq_worker'); is($warn[2], $warn[1], 'worker did not die'); +$SIG{__WARN__} = 'DEFAULT'; +is($ipc->wq_workers_start('wq', 1), $$, 'workers started again'); +is(scalar(keys %{$ipc->{-wq_workers}}), 1, '1 worker started'); +$ipc->wq_worker_incr; +is(scalar(keys %{$ipc->{-wq_workers}}), 2, 'worker count bumped'); +$ipc->wq_worker_decr; +$ipc->wq_worker_decr_wait(10); +is(scalar(keys %{$ipc->{-wq_workers}}), 1, 'worker count lowered'); + done_testing;