'L{ProcessMonitor.stopService} should cancel all scheduled process
restarts.'

def test_stopServiceCleanupScheduledRestarts(self):

    self.pm.threshold = 5
    self.pm.minRestartDelay = 5
    self.pm.startService()
    self.pm.addProcess('foo', ['foo'])
    self.reactor.advance(1)
    self.pm.stopProcess('foo')
    self.reactor.advance(1)
    self.pm.stopService()
    self.reactor.advance(6)
    self.assertEqual(self.pm.protocols, {})
