@Test
    public void testOneway() throws InterruptedException {
        MultiInterestBaseRequestBody req = new RequestBodyC1(2, "hello world oneway--c1");
        MultiInterestBaseRequestBody req2 = new RequestBodyC2(3, "hello world oneway--c2");
        for (int i = 0; i < invokeTimes; i++) {
            try {
                client.oneway(addr, req);
                Thread.sleep(100);
            } catch (RemotingException e) {
                String errMsg = "RemotingException caught in oneway!";
                logger.error(errMsg, e);
                Assert.fail(errMsg);
            }
        }
        for (int j = 0; j < invokeTimes; j++) {
            try {
                client.oneway(addr, req2);
                Thread.sleep(100);
            } catch (RemotingException e) {
                String errMsg = "RemotingException caught in oneway!";
                logger.error(errMsg, e);
                Assert.fail(errMsg);
            }
        }
        //System.out.println(serverUserProcessor.getInvokeTimesC1()+" "+serverUserProcessor.getInvokeTimesC2());

        Assert.assertTrue(serverConnectProcessor.isConnected());
        Assert.assertEquals(1, serverConnectProcessor.getConnectTimes());
        Assert.assertEquals(invokeTimes, serverUserProcessor.getInvokeTimesC1());
        Assert.assertEquals(invokeTimes, serverUserProcessor.getInvokeTimesC2());
    }
@antuor muyun.cyt (muyun.cyt@antfin.com)  2018/7/5   11:20 AM
src/test/java/com/alipay/remoting/rpc/userprocessor/multiinterestprocessor/BasicUsage_MultiInterestUserProcessorTest.java