Search in sources :

Example 6 with ConnectionOrderedChannelHandler

use of com.alibaba.dubbo.remoting.transport.dispatcher.connection.ConnectionOrderedChannelHandler in project dubbo by alibaba.

the class ConnectChannelHandlerTest method test_Connect_Execute_Error.

@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());
}
Also used : ThreadPoolExecutor(java.util.concurrent.ThreadPoolExecutor) ConnectionOrderedChannelHandler(com.alibaba.dubbo.remoting.transport.dispatcher.connection.ConnectionOrderedChannelHandler) Test(org.junit.Test)

Example 7 with ConnectionOrderedChannelHandler

use of com.alibaba.dubbo.remoting.transport.dispatcher.connection.ConnectionOrderedChannelHandler in project dubbo by alibaba.

the class ConnectChannelHandlerTest method test_Disconnect_Execute_Error.

@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());
}
Also used : ThreadPoolExecutor(java.util.concurrent.ThreadPoolExecutor) ConnectionOrderedChannelHandler(com.alibaba.dubbo.remoting.transport.dispatcher.connection.ConnectionOrderedChannelHandler) Test(org.junit.Test)

Aggregations

ConnectionOrderedChannelHandler (com.alibaba.dubbo.remoting.transport.dispatcher.connection.ConnectionOrderedChannelHandler)7 Test (org.junit.Test)7 ThreadPoolExecutor (java.util.concurrent.ThreadPoolExecutor)5 RemotingException (com.alibaba.dubbo.remoting.RemotingException)1 Request (com.alibaba.dubbo.remoting.exchange.Request)1 Response (com.alibaba.dubbo.remoting.exchange.Response)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 Ignore (org.junit.Ignore)1