- $ipc->WQ_MAX_WORKERS > 1 or
- skip 'Inline::C or Socket::MsgHdr not available', 4;
- $ipc->wq_worker_incr;
- is($ipc->wq_workers, 2, 'worker count bumped');
- $ipc->wq_worker_decr;
- $ipc->wq_worker_decr_wait(10);
- is($ipc->wq_workers, 1, 'worker count lowered');
- is($ipc->wq_workers(2), 2, 'worker count set');
- is($ipc->wq_workers, 2, 'worker count stayed set');
+ skip 'Socket::MsgHdr or Inline::C missing', 11 if !$ppids[0];
+ seek($warn, 0, SEEK_SET) or BAIL_OUT;
+ my @warn = <$warn>;
+ is(scalar(@warn), 3, 'warned 3 times');
+ 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($ipc->wq_workers, 1, '1 worker started');
+ SKIP: {
+ $ipc->WQ_MAX_WORKERS > 1 or
+ skip 'Inline::C or Socket::MsgHdr not available', 4;
+ $ipc->wq_worker_incr;
+ is($ipc->wq_workers, 2, 'worker count bumped');
+ $ipc->wq_worker_decr;
+ $ipc->wq_worker_decr_wait(10);
+ is($ipc->wq_workers, 1, 'worker count lowered');
+ is($ipc->wq_workers(2), 2, 'worker count set');
+ is($ipc->wq_workers, 2, 'worker count stayed set');
+ }
+ $ipc->wq_close;
+ is($ipc->wq_workers, undef, 'workers undef after close');