@Test
    public void testClientHeartBeatNotTrigger() throws InterruptedException {
        server.getRpcServer().registerProcessor(RpcProtocol.PROTOCOL_CODE,
            CommonCommandCode.HEARTBEAT, heartBeatProcessor);
        try {
            client.createStandaloneConnection(addr, 1000);
        } catch (RemotingException e) {
            logger.error("", e);
        }
        Thread.sleep(500);
        Assert.assertEquals(0, heartBeatProcessor.getHeartBeatTimes());
        Assert.assertEquals(1, clientConnectProcessor.getConnectTimes());
        Assert.assertEquals(1, serverConnectProcessor.getConnectTimes());
        Assert.assertEquals(0, clientDisConnectProcessor.getDisConnectTimes());// not closed,because heartbeat disabled
        Assert.assertEquals(0, serverDisConnectProcessor.getDisConnectTimes());// not closed,because heartbeat disabled
    }
Heart beat disable test

mode: disable heart beat (test no heart beat triggered, and the connection will not be closed)

@author xiaomin.cxm
@version $Id: HeartBeatTest.java, v 0.1 Apr 12, 2016 11:13:10 AM xiaomin.cxm Exp $
src/test/java/com/alipay/remoting/rpc/heartbeat/HeartBeatDisableTest.java