'When L{ClientService.stopService} is called while waiting between
connection attempts, the pending reconnection attempt is cancelled and
the service is stopped immediately.'

def test_retryCancelled(self):

    clock = Clock()
    (cq, service) = self.makeReconnector(fireImmediately=False, clock=clock)
    cq.connectQueue[0].errback(Exception('no    connection'))
    d = service.stopService()
    self.assertEqual(clock.getDelayedCalls(), [])
    self.successResultOf(d)
