Repository: activemq-artemis
Updated Branches:
  refs/heads/master cc2693691 -> 8cef53f39


NO-JIRA Adding LargeMessage & LVQTest


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/8cef53f3
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/8cef53f3
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/8cef53f3

Branch: refs/heads/master
Commit: 8cef53f39d93274a782773cdd97724004a596a1f
Parents: cc26936
Author: Clebert Suconic <clebertsuco...@apache.org>
Authored: Thu Aug 10 21:26:10 2017 -0400
Committer: Clebert Suconic <clebertsuco...@apache.org>
Committed: Thu Aug 10 21:26:17 2017 -0400

----------------------------------------------------------------------
 .../tests/integration/server/LVQTest.java       | 25 ++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8cef53f3/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/LVQTest.java
----------------------------------------------------------------------
diff --git 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/LVQTest.java
 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/LVQTest.java
index 9cc87b3..0706bc0 100644
--- 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/LVQTest.java
+++ 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/LVQTest.java
@@ -618,18 +618,39 @@ public class LVQTest extends ActiveMQTestBase {
       clientSessionTxReceives.commit();
    }
 
+   @Test
+   public void testLargeMessage() throws Exception {
+      ClientProducer producer = 
clientSessionTxReceives.createProducer(address);
+      ClientConsumer consumer = clientSessionTxReceives.createConsumer(qName1);
+      SimpleString rh = new SimpleString("SMID1");
+
+      for (int i = 0; i < 50; i++) {
+         ClientMessage message = clientSession.createMessage(true);
+         message.setBodyInputStream(createFakeLargeStream(300 * 1024));
+         message.putStringProperty(Message.HDR_LAST_VALUE_NAME, rh);
+         producer.send(message);
+         clientSession.commit();
+      }
+      clientSessionTxReceives.start();
+      ClientMessage m = consumer.receive(1000);
+      Assert.assertNotNull(m);
+      m.acknowledge();
+      Assert.assertNull(consumer.receiveImmediate());
+      clientSessionTxReceives.commit();
+   }
+
    @Override
    @Before
    public void setUp() throws Exception {
       super.setUp();
 
-      server = 
addServer(ActiveMQServers.newActiveMQServer(createDefaultInVMConfig(), false));
+      server = 
addServer(ActiveMQServers.newActiveMQServer(createDefaultNettyConfig(), true));
       // start the server
       server.start();
 
       server.getAddressSettingsRepository().addMatch(address.toString(), new 
AddressSettings().setLastValueQueue(true));
       // then we create a client as normalServer
-      ServerLocator locator = 
createInVMNonHALocator().setBlockOnAcknowledge(true).setAckBatchSize(0);
+      ServerLocator locator = 
createNettyNonHALocator().setBlockOnAcknowledge(true).setAckBatchSize(0);
 
       ClientSessionFactory sf = createSessionFactory(locator);
       clientSession = addClientSession(sf.createSession(false, true, true));

Reply via email to