@Test
    public void doNotReuseTest() {
        ClientTransportConfig config = new ClientTransportConfig();
        config.setProviderInfo(new ProviderInfo().setHost("127.0.0.1").setPort(12222))
            .setContainer("test");

        TestClientTransport clientTransport = (TestClientTransport) ClientTransportFactory.getClientTransport(config);

        ClientTransportConfig config2 = new ClientTransportConfig();
        config2.setProviderInfo(new ProviderInfo().setHost("127.0.0.1").setPort(12222))
            .setContainer("test");
        TestClientTransport clientTransport2 = (TestClientTransport) ClientTransportFactory.getClientTransport(config2);

        Assert.assertTrue(clientTransport != clientTransport2);

        ClientTransportConfig config3 = new ClientTransportConfig();
        config3.setProviderInfo(new ProviderInfo().setHost("127.0.0.1").setPort(12223))
            .setContainer("test");
        TestClientTransport clientTransport3 = (TestClientTransport) ClientTransportFactory.getClientTransport(config3);
        Assert.assertFalse(clientTransport == clientTransport3);

        ClientTransportFactory.releaseTransport(null, 300);

        clientTransport.setRequest(4);
        ClientTransportFactory.releaseTransport(clientTransport, 300);
        Assert.assertEquals(2, ClientTransportFactory.getClientTransportHolder().size());

        clientTransport2.setRequest(0);
        ClientTransportFactory.releaseTransport(clientTransport2, 300);
        Assert.assertEquals(1, ClientTransportFactory.getClientTransportHolder().size());

        ClientTransportFactory.closeAll();

        Assert.assertEquals(0, ClientTransportFactory.getClientTransportHolder().size());
    }
@author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
core/api/src/test/java/com/alipay/sofa/rpc/transport/ClientTransportFactoryTest.java