'The AMP connection remains open when communication is received at
any time up to the timeout limit.'

def test_timeout_reset_on_ping_activity(self):

    reactor = Clock()
    protocol = self.build_protocol(reactor)
    locator = _NoOpCounter()
    peer = AMP(locator=locator)
    pump = connectedServerAndClient((lambda : protocol), (lambda : peer))[2]
    reactor.advance(((2 * PING_INTERVAL.total_seconds()) - 0.1))
    initially_aborted = protocol.transport.disconnecting
    peer.callRemote(NoOp)
    pump.flush()
    reactor.advance(0.1)
    later_aborted = protocol.transport.disconnecting
    reactor.advance(((2 * PING_INTERVAL.total_seconds()) - 0.1))
    finally_aborted = protocol.transport.disconnecting
    self.assertEqual(dict(initially=initially_aborted, later=later_aborted, final=finally_aborted), dict(initially=False, later=False, final=True))
