'When the service is stopped while retrying, the retry is cancelled.'

def test_stopServiceWhileRetrying(self):

    clock = Clock()
    (cq, service) = self.makeReconnector(fireImmediately=False, clock=clock)
    cq.connectQueue[0].errback(Exception())
    clock.advance(AT_LEAST_ONE_ATTEMPT)
    self.assertEqual(len(cq.connectQueue), 2)
    d = service.stopService()
    cq.connectQueue[1].errback(Exception())
    self.successResultOf(d)
