Package com.alibaba.dubbo.remoting.transport.dispatcher.connection

Examples of com.alibaba.dubbo.remoting.transport.dispatcher.connection.ConnectionOrderedChannelHandler


public class ConnectChannelHandlerTest extends WrappedChannelHandlerTest{

    @Before
    public void setUp() throws Exception {
        handler = new ConnectionOrderedChannelHandler(new BizChannelHander(true), url);
    }
View Full Code Here


        handler = new ConnectionOrderedChannelHandler(new BizChannelHander(true), url);
    }
   
    @Test
    public void test_Connect_Blocked() throws RemotingException{
        handler = new ConnectionOrderedChannelHandler(new BizChannelHander(false), url);
        ThreadPoolExecutor executor = (ThreadPoolExecutor)getField(handler, "connectionExecutor", 1);
        Assert.assertEquals(1, executor.getMaximumPoolSize());
       
        int runs = 20;
        int taskCount = runs * 2;
 
View Full Code Here

        Assert.assertEquals(taskCount, executor.getCompletedTaskCount());       
    }
   
    @Test //biz error 不抛出到线程异常上来.
    public void test_Connect_Biz_Error() throws RemotingException{
        handler = new ConnectionOrderedChannelHandler(new BizChannelHander(true), url);
        handler.connected(new MockedChannel());
    }
View Full Code Here

        handler = new ConnectionOrderedChannelHandler(new BizChannelHander(true), url);
        handler.connected(new MockedChannel());
    }
    @Test //biz error 不抛出到线程异常上来.
    public void test_Disconnect_Biz_Error() throws RemotingException{
        handler = new ConnectionOrderedChannelHandler(new BizChannelHander(true), url);
        handler.disconnected(new MockedChannel());
    }
View Full Code Here

        handler.disconnected(new MockedChannel());
    }
   
    @Test(expected = ExecutionException.class)
    public void test_Connect_Execute_Error() throws RemotingException{
        handler = new ConnectionOrderedChannelHandler(new BizChannelHander(false), url);
        ThreadPoolExecutor executor = (ThreadPoolExecutor)getField(handler, "connectionExecutor", 1);
        executor.shutdown();
        handler.connected(new MockedChannel());
    }
View Full Code Here

        executor.shutdown();
        handler.connected(new MockedChannel());
    }
    @Test(expected = ExecutionException.class)
    public void test_Disconnect_Execute_Error() throws RemotingException{
        handler = new ConnectionOrderedChannelHandler(new BizChannelHander(false), url);
        ThreadPoolExecutor executor = (ThreadPoolExecutor)getField(handler, "connectionExecutor", 1);
        executor.shutdown();
        handler.disconnected(new MockedChannel());
    }
View Full Code Here

    public void test_Caught_Biz_Error() throws RemotingException{
        handler.caught(new MockedChannel(), new BizException());
    }
    @Test(expected = ExecutionException.class)
    public void test_Received_InvokeInExecuter() throws RemotingException{
        handler = new ConnectionOrderedChannelHandler(new BizChannelHander(false), url);
        ThreadPoolExecutor executor = (ThreadPoolExecutor)getField(handler, "SHARED_EXECUTOR", 1);
        executor.shutdown();
        executor = (ThreadPoolExecutor)getField(handler, "executor", 1);
        executor.shutdown();
        handler.received(new MockedChannel(), "");
View Full Code Here

     */
    @SuppressWarnings("deprecation")
    @Ignore("Heartbeat is processed in HeartbeatHandler not WrappedChannelHandler.")
    @Test
    public void test_Received_Event_invoke_direct() throws RemotingException{
        handler = new ConnectionOrderedChannelHandler(new BizChannelHander(false), url);
        ThreadPoolExecutor executor = (ThreadPoolExecutor)getField(handler, "SHARED_EXECUTOR", 1);
        executor.shutdown();
        executor = (ThreadPoolExecutor)getField(handler, "executor", 1);
        executor.shutdown();
        Request req = new Request();
View Full Code Here

TOP

Related Classes of com.alibaba.dubbo.remoting.transport.dispatcher.connection.ConnectionOrderedChannelHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.