'L{ProcessMonitor.connectionLost} should immediately restart a process
if it has been running longer than L{ProcessMonitor.threshold} seconds.'

def test_connectionLostLongLivedProcess(self):

    self.pm.addProcess('foo', ['foo'])
    self.pm.startService()
    self.reactor.advance(0)
    self.assertIn('foo', self.pm.protocols)
    self.reactor.advance(self.pm.threshold)
    self.pm.protocols['foo'].processEnded(Failure(ProcessDone(0)))
    self.assertNotIn('foo', self.pm.protocols)
    self.reactor.advance(0)
    self.assertIn('foo', self.pm.protocols)
