Search in sources :

Example 11 with SimpleTestServerConnection

use of com.linkedin.databus2.test.container.SimpleTestServerConnection in project databus by linkedin.

the class SimpleClientPipelineFactoryWithSleep method testClientSimpleRequestResponse.

@Test
public void testClientSimpleRequestResponse() {
    DbusEventFactory eventFactory = new DbusEventV1Factory();
    SimpleTestServerConnection srvConn = new SimpleTestServerConnection(eventFactory.getByteOrder());
    srvConn.setPipelineFactory(new SimpleServerPipelineFactory());
    boolean serverStarted = srvConn.startSynchronously(101, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(serverStarted, "server started");
    final SimpleTestClientConnection clientConn = new SimpleTestClientConnection(eventFactory.getByteOrder());
    clientConn.setPipelineFactory(new SimpleClientPipelineFactoryWithSleep(200));
    boolean clientConnected = clientConn.startSynchronously(101, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(clientConnected, "client connected");
    //hook in to key places in the server pipeline
    ChannelPipeline lastSrvConnPipeline = srvConn.getLastConnChannel().getPipeline();
    SimpleTestMessageReader srvMsgReader = (SimpleTestMessageReader) lastSrvConnPipeline.get(SimpleTestMessageReader.class.getSimpleName());
    ExceptionListenerTestHandler srvExceptionListener = (ExceptionListenerTestHandler) lastSrvConnPipeline.get(ExceptionListenerTestHandler.class.getSimpleName());
    //hook in to key places in the client pipeline
    ChannelPipeline clientPipeline = clientConn.getChannel().getPipeline();
    final ExceptionListenerTestHandler clientExceptionListener = (ExceptionListenerTestHandler) clientPipeline.get(ExceptionListenerTestHandler.class.getSimpleName());
    //System.err.println("Current thread: " + Thread.currentThread());
    //send a request in a separate thread because the client will intentionally block to simulate
    //a timeout
    final ChannelBuffer msg = ChannelBuffers.wrappedBuffer("hello".getBytes(Charset.defaultCharset()));
    Thread sendThread1 = new Thread(new Runnable() {

        @Override
        public void run() {
            //System.err.println(Thread.currentThread().toString() + ": sending message");
            clientConn.getChannel().write(msg);
        }
    }, "send msg thread");
    sendThread1.start();
    //System.err.println(Thread.currentThread().toString() + ": waiting for 10");
    try {
        Thread.sleep(50);
    } catch (InterruptedException ie) {
    }
    ;
    //System.err.println(Thread.currentThread().toString() + ": done Waiting for 10");
    //make sure the server has not received the message
    Assert.assertNull(srvExceptionListener.getLastException(), "no server errors");
    Assert.assertNull(clientExceptionListener.getLastException(), "no errors yet");
    Assert.assertTrue(!"hello".equals(srvMsgReader.getMsg()), "message not read yet");
    //wait for the write timeout
    try {
        Thread.sleep(300);
    } catch (InterruptedException ie) {
    }
    ;
    //System.err.println("Done Waiting for 300");
    //the client should have timed out and closed the connection
    TestUtil.assertWithBackoff(new ConditionCheck() {

        @Override
        public boolean check() {
            return null != clientExceptionListener.getLastException();
        }
    }, "client error", 1000, null);
    Assert.assertTrue(null != clientExceptionListener.getLastException(), "client error");
    Assert.assertTrue(clientExceptionListener.getLastException() instanceof ClosedChannelException || clientExceptionListener.getLastException() instanceof WriteTimeoutException, "client error test");
    Assert.assertTrue(!lastSrvConnPipeline.getChannel().isConnected(), "client has disconnected");
    Assert.assertTrue(!clientPipeline.getChannel().isConnected(), "closed connection to server");
}
Also used : SimpleTestClientConnection(com.linkedin.databus2.test.container.SimpleTestClientConnection) ConditionCheck(com.linkedin.databus2.test.ConditionCheck) ClosedChannelException(java.nio.channels.ClosedChannelException) SimpleTestMessageReader(com.linkedin.databus2.test.container.SimpleTestMessageReader) SimpleTestServerConnection(com.linkedin.databus2.test.container.SimpleTestServerConnection) ExceptionListenerTestHandler(com.linkedin.databus2.test.container.ExceptionListenerTestHandler) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline) ChannelBuffer(org.jboss.netty.buffer.ChannelBuffer) WriteTimeoutException(org.jboss.netty.handler.timeout.WriteTimeoutException) DbusEventV1Factory(com.linkedin.databus.core.DbusEventV1Factory) DbusEventFactory(com.linkedin.databus.core.DbusEventFactory) Test(org.testng.annotations.Test)

Example 12 with SimpleTestServerConnection

use of com.linkedin.databus2.test.container.SimpleTestServerConnection in project databus by linkedin.

the class TestDatabusV2RegistrationImpl method setUpClass.

@BeforeClass
public void setUpClass() throws InvalidConfigException {
    //setup logging
    TestUtil.setupLogging(true, null, Level.INFO);
    InternalLoggerFactory.setDefaultFactory(new Log4JLoggerFactory());
    //initialize relays
    for (int relayN = 0; relayN < RELAY_PORT.length; ++relayN) {
        _dummyServer[relayN] = new SimpleTestServerConnection(new DbusEventV2Factory().getByteOrder(), SimpleTestServerConnection.ServerType.NIO);
        _dummyServer[relayN].setPipelineFactory(new ChannelPipelineFactory() {

            @Override
            public ChannelPipeline getPipeline() throws Exception {
                return Channels.pipeline(new LoggingHandler(InternalLogLevel.DEBUG), new HttpServerCodec(), new LoggingHandler(InternalLogLevel.DEBUG), new SimpleObjectCaptureHandler());
            }
        });
        _dummyServer[relayN].start(RELAY_PORT[relayN]);
    }
    //create standard client config
    DatabusHttpClientImpl.Config clientCfgBuilder = new DatabusHttpClientImpl.Config();
    clientCfgBuilder.getContainer().setHttpPort(CLIENT_PORT);
    clientCfgBuilder.getContainer().getJmx().setRmiEnabled(false);
    clientCfgBuilder.getContainer().setReadTimeoutMs(10000000);
    clientCfgBuilder.getConnectionDefaults().getPullerRetries().setInitSleep(10);
    clientCfgBuilder.getRuntime().getBootstrap().setEnabled(false);
    clientCfgBuilder.getCheckpointPersistence().setClearBeforeUse(true);
    for (int i = 0; i < RELAY_PORT.length; ++i) {
        clientCfgBuilder.getRuntime().getRelay(Integer.toString(i)).setHost("localhost");
        clientCfgBuilder.getRuntime().getRelay(Integer.toString(i)).setPort(RELAY_PORT[i]);
        clientCfgBuilder.getRuntime().getRelay(Integer.toString(i)).setSources(SOURCE1_NAME);
    }
    _stdClientCfgBuilder = clientCfgBuilder;
    _stdClientCfg = clientCfgBuilder.build();
    //create standard relay buffer config
    DbusEventBuffer.Config bufCfgBuilder = new DbusEventBuffer.Config();
    bufCfgBuilder.setAllocationPolicy(AllocationPolicy.HEAP_MEMORY.toString());
    bufCfgBuilder.setMaxSize(100000);
    bufCfgBuilder.setScnIndexSize(128);
    bufCfgBuilder.setAverageEventSize(1);
    _bufCfg = bufCfgBuilder.build();
}
Also used : LoggingHandler(org.jboss.netty.handler.logging.LoggingHandler) SimpleTestServerConnection(com.linkedin.databus2.test.container.SimpleTestServerConnection) DatabusHttpClientImpl(com.linkedin.databus.client.DatabusHttpClientImpl) InvalidConfigException(com.linkedin.databus.core.util.InvalidConfigException) DatabusClientException(com.linkedin.databus.client.pub.DatabusClientException) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline) DbusEventBuffer(com.linkedin.databus.core.DbusEventBuffer) SimpleObjectCaptureHandler(com.linkedin.databus2.test.container.SimpleObjectCaptureHandler) HttpServerCodec(org.jboss.netty.handler.codec.http.HttpServerCodec) Log4JLoggerFactory(org.jboss.netty.logging.Log4JLoggerFactory) DbusEventV2Factory(com.linkedin.databus.core.DbusEventV2Factory) ChannelPipelineFactory(org.jboss.netty.channel.ChannelPipelineFactory) BeforeClass(org.testng.annotations.BeforeClass)

Example 13 with SimpleTestServerConnection

use of com.linkedin.databus2.test.container.SimpleTestServerConnection in project databus by linkedin.

the class DummyRemoteExceptionHandler method setUpClass.

@BeforeClass
public void setUpClass() throws InvalidConfigException {
    TestUtil.setupLoggingWithTimestampedFile(true, "/tmp/TestNettyHttpDatabusRelayConnection_", ".log", Level.INFO);
    InternalLoggerFactory.setDefaultFactory(new Log4JLoggerFactory());
    _dummyServer = new SimpleTestServerConnection(new DbusEventV2Factory().getByteOrder(), SimpleTestServerConnection.ServerType.NIO);
    _dummyServer.setPipelineFactory(new ChannelPipelineFactory() {

        @Override
        public ChannelPipeline getPipeline() throws Exception {
            return Channels.pipeline(new LoggingHandler(InternalLogLevel.DEBUG), new HttpServerCodec(), new LoggingHandler(InternalLogLevel.DEBUG), new SimpleObjectCaptureHandler());
        }
    });
    _dummyServer.start(SERVER_ADDRESS_ID);
    DatabusHttpClientImpl.Config clientCfgBuilder = new DatabusHttpClientImpl.Config();
    clientCfgBuilder.getContainer().setReadTimeoutMs(DEFAULT_READ_TIMEOUT_MS);
    clientCfgBuilder.getContainer().setWriteTimeoutMs(DEFAULT_WRITE_TIMEOUT_MS);
    CONN_FACTORY = new NettyHttpConnectionFactory(BOSS_POOL, IO_POOL, null, NETWORK_TIMER, clientCfgBuilder.getContainer().getWriteTimeoutMs(), clientCfgBuilder.getContainer().getReadTimeoutMs(), clientCfgBuilder.getContainer().getBstReadTimeoutMs(), // protocolVersion
    4, MAX_EVENT_VERSION, TEST_CHANNELS_GROUP);
    DbusEventBuffer.Config bufCfgBuilder = new DbusEventBuffer.Config();
    bufCfgBuilder.setAllocationPolicy(AllocationPolicy.HEAP_MEMORY.toString());
    bufCfgBuilder.setMaxSize(100000);
    bufCfgBuilder.setScnIndexSize(128);
    bufCfgBuilder.setAverageEventSize(1);
    _bufCfg = bufCfgBuilder.build();
    initSchemaObjectsLists();
    _fullV4ResponseMap = new HashMap<String, List<Object>>();
    _fullV4ResponseMap.put(RegisterResponseEntry.SOURCE_SCHEMAS_KEY, _sourceObjectsList);
    _fullV4ResponseMap.put(RegisterResponseEntry.KEY_SCHEMAS_KEY, _keyObjectsList);
    _fullV4ResponseMap.put(RegisterResponseMetadataEntry.METADATA_SCHEMAS_KEY, _metadataObjectsList);
}
Also used : LoggingHandler(org.jboss.netty.handler.logging.LoggingHandler) SimpleTestServerConnection(com.linkedin.databus2.test.container.SimpleTestServerConnection) DatabusHttpClientImpl(com.linkedin.databus.client.DatabusHttpClientImpl) InvalidEventException(com.linkedin.databus.core.InvalidEventException) ScnNotFoundException(com.linkedin.databus.core.ScnNotFoundException) OffsetNotFoundException(com.linkedin.databus.core.OffsetNotFoundException) InvalidConfigException(com.linkedin.databus.core.util.InvalidConfigException) JsonGenerationException(org.codehaus.jackson.JsonGenerationException) JsonMappingException(org.codehaus.jackson.map.JsonMappingException) IOException(java.io.IOException) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline) DbusEventBuffer(com.linkedin.databus.core.DbusEventBuffer) SimpleObjectCaptureHandler(com.linkedin.databus2.test.container.SimpleObjectCaptureHandler) HttpServerCodec(org.jboss.netty.handler.codec.http.HttpServerCodec) List(java.util.List) ArrayList(java.util.ArrayList) Log4JLoggerFactory(org.jboss.netty.logging.Log4JLoggerFactory) DbusEventV2Factory(com.linkedin.databus.core.DbusEventV2Factory) ChannelPipelineFactory(org.jboss.netty.channel.ChannelPipelineFactory) BeforeClass(org.testng.annotations.BeforeClass)

Example 14 with SimpleTestServerConnection

use of com.linkedin.databus2.test.container.SimpleTestServerConnection in project databus by linkedin.

the class SimpleClientPipelineFactory method testServerSimpleRequestResponse.

@Test
public /**
   * Simulates the follow communication with no induced timeouts
   *
   * <table>
   * <th><td>client</td><td>server</td></th>
   * <tr><td>send "hello"</td><td></td></tr>
   * <tr><td></td><td>start read timeout</td></tr>
   * <tr><td>send "eom"</td><td></td></tr>
   * <tr><td>start read timeout</td><td></td></tr>
   * <tr><td></td><td>stop read timeout</td></tr>
   * <tr><td></td>send "hi there"<td></td></tr>
   * <tr><td></td>send "eom"<td></td></tr>
   * <tr><td>stop read timeout</td><td></td></tr>
   * </table>
   */
void testServerSimpleRequestResponse() {
    SimpleTestServerConnection srvConn = new SimpleTestServerConnection(_eventFactory.getByteOrder());
    srvConn.setPipelineFactory(new SimpleServerPipelineFactory());
    boolean serverStarted = srvConn.startSynchronously(1, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(serverStarted, "server started");
    SimpleTestClientConnection clientConn = new SimpleTestClientConnection(_eventFactory.getByteOrder());
    clientConn.setPipelineFactory(new SimpleClientPipelineFactory());
    boolean clientConnected = clientConn.startSynchronously(1, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(clientConnected, "client connected");
    //hook in to key places in the server pipeline
    ChannelPipeline lastSrvConnPipeline = srvConn.getLastConnChannel().getPipeline();
    ExtendedReadTimeoutHandler srvTimeoutHandler = (ExtendedReadTimeoutHandler) lastSrvConnPipeline.get(ExtendedReadTimeoutHandler.class.getSimpleName());
    SimpleTestMessageReader srvMsgReader = (SimpleTestMessageReader) lastSrvConnPipeline.get(SimpleTestMessageReader.class.getSimpleName());
    ExceptionListenerTestHandler srvExceptionListener = (ExceptionListenerTestHandler) lastSrvConnPipeline.get(ExceptionListenerTestHandler.class.getSimpleName());
    //hook in to key places in the client pipeline
    ChannelPipeline clientPipeline = clientConn.getChannel().getPipeline();
    ExtendedReadTimeoutHandler clientTimeoutHandler = (ExtendedReadTimeoutHandler) clientPipeline.get(ExtendedReadTimeoutHandler.class.getSimpleName());
    SimpleTestMessageReader clientMsgReader = (SimpleTestMessageReader) clientPipeline.get(SimpleTestMessageReader.class.getSimpleName());
    ExceptionListenerTestHandler clientExceptionListener = (ExceptionListenerTestHandler) clientPipeline.get(ExceptionListenerTestHandler.class.getSimpleName());
    //send a request
    ChannelBuffer msg = ChannelBuffers.wrappedBuffer("hello".getBytes(Charset.defaultCharset()));
    clientConn.getChannel().write(msg);
    //wait for the request to propagate
    try {
        Thread.sleep(10);
    } catch (InterruptedException ie) {
    }
    ;
    Assert.assertNull(srvExceptionListener.getLastException(), "no server read timeout");
    Assert.assertNull(clientExceptionListener.getLastException(), "no client read timeout");
    Assert.assertEquals(srvMsgReader.getMsg(), "hello", "message read");
    //start server read timeout
    srvTimeoutHandler.start(lastSrvConnPipeline.getContext(srvTimeoutHandler));
    ChannelBuffer msg2 = ChannelBuffers.wrappedBuffer("eom".getBytes(Charset.defaultCharset()));
    clientConn.getChannel().write(msg2);
    //start the client timeout handler
    clientTimeoutHandler.start(clientPipeline.getContext(clientTimeoutHandler));
    Assert.assertNull(srvExceptionListener.getLastException(), "no server read timeout");
    Assert.assertNull(clientExceptionListener.getLastException(), "no client read timeout");
    Assert.assertEquals(srvMsgReader.getMsg(), "eom", "message read");
    //stop server read timeout
    srvTimeoutHandler.stop();
    ChannelBuffer resp = ChannelBuffers.wrappedBuffer("hi there".getBytes(Charset.defaultCharset()));
    lastSrvConnPipeline.getChannel().write(resp);
    //wait for the response to propagate
    try {
        Thread.sleep(10);
    } catch (InterruptedException ie) {
    }
    ;
    Assert.assertNull(srvExceptionListener.getLastException(), "no server read timeout");
    Assert.assertNull(clientExceptionListener.getLastException(), "no client read timeout");
    Assert.assertEquals(clientMsgReader.getMsg(), "hi there", "response read");
    ChannelBuffer resp2 = ChannelBuffers.wrappedBuffer("eom".getBytes(Charset.defaultCharset()));
    lastSrvConnPipeline.getChannel().write(resp2);
    //wait for the response to propagate
    try {
        Thread.sleep(10);
    } catch (InterruptedException ie) {
    }
    ;
    Assert.assertNull(srvExceptionListener.getLastException(), "no server read timeout");
    Assert.assertNull(clientExceptionListener.getLastException(), "no client read timeout");
    Assert.assertEquals(clientMsgReader.getMsg(), "eom", "response read");
    //stop client read timeout
    clientTimeoutHandler.stop();
    clientConn.stop();
    srvConn.stop();
}
Also used : SimpleTestClientConnection(com.linkedin.databus2.test.container.SimpleTestClientConnection) SimpleTestMessageReader(com.linkedin.databus2.test.container.SimpleTestMessageReader) SimpleTestServerConnection(com.linkedin.databus2.test.container.SimpleTestServerConnection) ExceptionListenerTestHandler(com.linkedin.databus2.test.container.ExceptionListenerTestHandler) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline) ChannelBuffer(org.jboss.netty.buffer.ChannelBuffer) Test(org.testng.annotations.Test)

Example 15 with SimpleTestServerConnection

use of com.linkedin.databus2.test.container.SimpleTestServerConnection in project databus by linkedin.

the class SimpleClientPipelineFactory method testServerComplexRequestResponse.

@Test
public /**
   * Simulates the follow communication with no induced timeouts
   *
   * <table>
   * <th><td>client</td><td>server</td></th>
   * <tr><td>send "hello1"</td><td></td></tr>
   * <tr><td></td><td>start read timeout</td></tr>
   * <tr><td>send "hello2"</td><td></td></tr>
   * <tr><td>:</td><td></td></tr>
   * <tr><td>:</td><td></td></tr>
   * <tr><td>send "hello50"</td><td></td></tr>
   * <tr><td>send "eom"</td><td></td></tr>
   * <tr><td>start read timeout</td><td></td></tr>
   * <tr><td></td><td>stop read timeout</td></tr>
   * <tr><td></td>send "hi there1"<td></td></tr>
   * <tr><td></td>send ":"<td></td></tr>
   * <tr><td></td>send "hi there100"<td></td></tr>
   * <tr><td></td>send "eom"<td></td></tr>
   * <tr><td>stop read timeout</td><td></td></tr>
   * </table>
   */
void testServerComplexRequestResponse() {
    SimpleTestServerConnection srvConn = new SimpleTestServerConnection(_eventFactory.getByteOrder());
    srvConn.setPipelineFactory(new SimpleServerPipelineFactory());
    boolean serverStarted = srvConn.startSynchronously(2, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(serverStarted, "server started");
    SimpleTestClientConnection clientConn = new SimpleTestClientConnection(_eventFactory.getByteOrder());
    clientConn.setPipelineFactory(new SimpleClientPipelineFactory());
    boolean clientConnected = clientConn.startSynchronously(2, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(clientConnected, "client connected");
    //hook in to key places in the server pipeline
    ChannelPipeline lastSrvConnPipeline = srvConn.getLastConnChannel().getPipeline();
    ExtendedReadTimeoutHandler srvTimeoutHandler = (ExtendedReadTimeoutHandler) lastSrvConnPipeline.get(ExtendedReadTimeoutHandler.class.getSimpleName());
    SimpleTestMessageReader srvMsgReader = (SimpleTestMessageReader) lastSrvConnPipeline.get(SimpleTestMessageReader.class.getSimpleName());
    ExceptionListenerTestHandler srvExceptionListener = (ExceptionListenerTestHandler) lastSrvConnPipeline.get(ExceptionListenerTestHandler.class.getSimpleName());
    //hook in to key places in the client pipeline
    ChannelPipeline clientPipeline = clientConn.getChannel().getPipeline();
    ExtendedReadTimeoutHandler clientTimeoutHandler = (ExtendedReadTimeoutHandler) clientPipeline.get(ExtendedReadTimeoutHandler.class.getSimpleName());
    SimpleTestMessageReader clientMsgReader = (SimpleTestMessageReader) clientPipeline.get(SimpleTestMessageReader.class.getSimpleName());
    ExceptionListenerTestHandler clientExceptionListener = (ExceptionListenerTestHandler) clientPipeline.get(ExceptionListenerTestHandler.class.getSimpleName());
    for (int i = 0; i < 50; ++i) {
        //send a request
        ChannelBuffer msg = ChannelBuffers.wrappedBuffer(("hello" + i).getBytes(Charset.defaultCharset()));
        clientConn.getChannel().write(msg);
        //wait for the request to propagate
        try {
            Thread.sleep(10);
        } catch (InterruptedException ie) {
        }
        ;
        Assert.assertNull(srvExceptionListener.getLastException(), "no server read timeout: " + i);
        Assert.assertNull(clientExceptionListener.getLastException(), "no client read timeout: " + i);
        Assert.assertEquals(srvMsgReader.getMsg(), "hello" + i, "message read: " + i);
        //start server read timeout after the first message
        if (0 == i)
            srvTimeoutHandler.start(lastSrvConnPipeline.getContext(srvTimeoutHandler));
    }
    ChannelBuffer msg2 = ChannelBuffers.wrappedBuffer("eom".getBytes(Charset.defaultCharset()));
    clientConn.getChannel().write(msg2);
    //start the client timeout handler
    clientTimeoutHandler.start(clientPipeline.getContext(clientTimeoutHandler));
    Assert.assertNull(srvExceptionListener.getLastException(), "no server read timeout");
    Assert.assertNull(clientExceptionListener.getLastException(), "no client read timeout");
    Assert.assertEquals(srvMsgReader.getMsg(), "eom", "message read");
    //stop server read timeout
    srvTimeoutHandler.stop();
    for (int i = 0; i < 100; ++i) {
        String responseString = "hi there " + i;
        ChannelBuffer resp = ChannelBuffers.wrappedBuffer(responseString.getBytes(Charset.defaultCharset()));
        lastSrvConnPipeline.getChannel().write(resp);
        //wait for the response to propagate
        try {
            Thread.sleep(10);
        } catch (InterruptedException ie) {
        }
        ;
        Assert.assertNull(srvExceptionListener.getLastException(), "no server read timeout: " + i);
        Assert.assertNull(clientExceptionListener.getLastException(), "no client read timeout: " + i);
        Assert.assertEquals(clientMsgReader.getMsg(), responseString, "response read: " + i);
    }
    ChannelBuffer resp2 = ChannelBuffers.wrappedBuffer("eom".getBytes(Charset.defaultCharset()));
    lastSrvConnPipeline.getChannel().write(resp2);
    //wait for the response to propagate
    try {
        Thread.sleep(10);
    } catch (InterruptedException ie) {
    }
    ;
    Assert.assertNull(srvExceptionListener.getLastException(), "no server read timeout");
    Assert.assertNull(clientExceptionListener.getLastException(), "no client read timeout");
    Assert.assertEquals(clientMsgReader.getMsg(), "eom", "response read");
    //stop client read timeout
    clientTimeoutHandler.stop();
    clientConn.stop();
    srvConn.stop();
}
Also used : SimpleTestClientConnection(com.linkedin.databus2.test.container.SimpleTestClientConnection) SimpleTestMessageReader(com.linkedin.databus2.test.container.SimpleTestMessageReader) SimpleTestServerConnection(com.linkedin.databus2.test.container.SimpleTestServerConnection) ExceptionListenerTestHandler(com.linkedin.databus2.test.container.ExceptionListenerTestHandler) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline) ChannelBuffer(org.jboss.netty.buffer.ChannelBuffer) Test(org.testng.annotations.Test)

Aggregations

SimpleTestServerConnection (com.linkedin.databus2.test.container.SimpleTestServerConnection)17 ChannelPipeline (org.jboss.netty.channel.ChannelPipeline)17 SimpleObjectCaptureHandler (com.linkedin.databus2.test.container.SimpleObjectCaptureHandler)11 ChannelBuffer (org.jboss.netty.buffer.ChannelBuffer)11 Test (org.testng.annotations.Test)11 DbusEventBuffer (com.linkedin.databus.core.DbusEventBuffer)10 ConditionCheck (com.linkedin.databus2.test.ConditionCheck)9 DefaultHttpChunk (org.jboss.netty.handler.codec.http.DefaultHttpChunk)8 DefaultHttpResponse (org.jboss.netty.handler.codec.http.DefaultHttpResponse)8 HttpChunk (org.jboss.netty.handler.codec.http.HttpChunk)8 HttpResponse (org.jboss.netty.handler.codec.http.HttpResponse)8 Checkpoint (com.linkedin.databus.core.Checkpoint)7 RegisterResponseEntry (com.linkedin.databus2.core.container.request.RegisterResponseEntry)7 NettyHttpDatabusRelayConnection (com.linkedin.databus.client.netty.NettyHttpDatabusRelayConnection)6 NettyHttpDatabusRelayConnectionInspector (com.linkedin.databus.client.netty.NettyHttpDatabusRelayConnectionInspector)6 DbusEventInfo (com.linkedin.databus.core.DbusEventInfo)6 DbusEventsStatisticsCollector (com.linkedin.databus.core.monitoring.mbean.DbusEventsStatisticsCollector)6 InvalidConfigException (com.linkedin.databus.core.util.InvalidConfigException)6 InetSocketAddress (java.net.InetSocketAddress)6 SocketAddress (java.net.SocketAddress)6