public function test_process_ShouldNotDirectlyProcessQueue_IfAlreadyLocked()
 {
     Queue\Factory::getSettings()->numQueueWorkers->setValue(1);
     $this->handler->enableProcessingInTrackerMode();
     $this->queue->setNumberOfRequestsToProcessAtSameTime(1);
     // there is only one worker, so make sure that queue is locked
     $lock = new Queue\Lock($this->backend);
     $lock->acquireLock(0);
     $this->assertSame(0, $this->queue->getNumberOfRequestSetsInAllQueues());
     $this->processDummyRequests();
     $this->assertSame(1, $this->queue->getNumberOfRequestSetsInAllQueues());
     $this->processDummyRequests();
     $this->assertSame(2, $this->queue->getNumberOfRequestSetsInAllQueues());
     $this->queue->unlock();
 }
 private function assertNumberOfRequestSetsLeftInQueue($numRequestsLeftInQueue)
 {
     $this->assertSame($numRequestsLeftInQueue, $this->queue->getNumberOfRequestSetsInAllQueues());
 }