private void doTest(String url, RequestBody.InvokeType type, int invokeTimes,
                        int expectConnTimes, int expectMaxFirstInvokeTimeDuration) {
        try {
            RpcAddressParser parser = new RpcAddressParser();
            final Url addr = parser.parse(url);
            for (int i = 0; i < invokeTimes; i++) {
                long start = System.currentTimeMillis();
                String ret = (String) doInvoke(type, url);
                long end = System.currentTimeMillis();
                logger.warn("WITH WARMUP, first invoke cost ->" + (end - start));
                if ((end - start) > expectMaxFirstInvokeTimeDuration
                    && expectMaxFirstInvokeTimeDuration != -1) {
                    Assert.fail("Should not reach here, First invoke cost too much time ["
                                + (end - start) + "ms], expect limit in ["
                                + expectMaxFirstInvokeTimeDuration + "ms]!");
                }
                if (!type.equals(RequestBody.InvokeType.ONEWAY)) {
                    Assert.assertEquals(ret, RequestBody.DEFAULT_SERVER_RETURN_STR);
                }
            }

            if (addr.isConnWarmup()) {
                Thread.sleep(200);// must wait, to wait event finish
                Assert.assertEquals(expectConnTimes, serverConnectProcessor.getConnectTimes());
                Assert.assertEquals(expectConnTimes, clientConnectProcessor.getConnectTimes());

                client.closeConnection(addr);
                Thread.sleep(200);// must wait, to wait event finish
                Assert
                    .assertEquals(expectConnTimes, serverDisConnectProcessor.getDisConnectTimes());
                Assert
                    .assertEquals(expectConnTimes, clientDisConnectProcessor.getDisConnectTimes());
            } else {
                Thread.sleep(200);// must wait, to wait event finish
                Assert.assertTrue(serverConnectProcessor.getConnectTimes() >= expectConnTimes);
                Assert.assertTrue(clientConnectProcessor.getConnectTimes() >= expectConnTimes);

                client.closeConnection(addr);
                Thread.sleep(200);// must wait, to wait event finish
                Assert
                    .assertTrue(serverDisConnectProcessor.getDisConnectTimes() >= expectConnTimes);
                Assert
                    .assertTrue(clientDisConnectProcessor.getDisConnectTimes() >= expectConnTimes);
            }
        } catch (RemotingException e) {
            logger.error("Exception caught in sync!", e);
            Assert.fail("Should not reach here!");
        } catch (InterruptedException e) {
            logger.error("InterruptedException in sync", e);
            Assert.fail("Should not reach here!");
        }
    }
url: url with different args
invokeTimes: rpc invoke times
expectConnTimes: expect connection times for client and server
expectMaxFirstInvokeTimeDuration: expect first invoke time cost, if assign -1, then will not do check

@param url
@param invokeTimes
@param expectConnTimes
@param expectMaxFirstInvokeTimeDuration
src/test/java/com/alipay/remoting/rpc/addressargs/AddressArgs_CONNECTIONNUM_Test.java