new DummyConnectionLifeCycleListener(null),
threadPool,
threadPool,
scheduledThreadPool);
connector.start();
Connection conn = connector.createConnection();
connCreatedLatch.await(5, TimeUnit.SECONDS);
for (int i = 0; i < numPackets; i++)
{
HornetQBuffer buff = conn.createBuffer(8);
buff.writeInt(4);
buff.writeInt(i);
conn.write(buff);
}
for (int i = 0; i < numPackets; i++)
{
HornetQBuffer buff = conn.createBuffer(8);
buff.writeInt(4);
buff.writeInt(i);
acceptorListener.connection.write(buff);
}
Assert.assertTrue(acceptorLatch.await(10, TimeUnit.SECONDS));
Assert.assertTrue(connectorLatch.await(10, TimeUnit.SECONDS));
conn.close();
Assert.assertEquals(acceptorHandler.messagesReceieved, numPackets);
Assert.assertEquals(connectorHandler.messagesReceieved, numPackets);
int i = 0;
for (Integer j : acceptorHandler.messages)
{