Author: clebert.suconic(a)jboss.com
Date: 2011-12-20 21:53:58 -0500 (Tue, 20 Dec 2011)
New Revision: 11921
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java
Log:
https://issues.jboss.org/browse/JBPAPP-7161 - testDuplicates
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java
===================================================================
---
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java 2011-12-21
02:47:09 UTC (rev 11920)
+++
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java 2011-12-21
02:53:58 UTC (rev 11921)
@@ -974,9 +974,19 @@
}
}
}
+
+ public void testSentWithDuplicateIDBridge() throws Exception
+ {
+ internalTestSentWithDuplicateID(true);
+ }
public void testSentWithDuplicateID() throws Exception
{
+ internalTestSentWithDuplicateID(false);
+ }
+
+ private void internalTestSentWithDuplicateID(final boolean isSimulateBridge) throws
Exception
+ {
final int messageSize = 3 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE;
ClientSession session = null;
@@ -1001,7 +1011,14 @@
{
Message clientFile = createLargeClientMessage(session, messageSize, true);
- clientFile.putBytesProperty(MessageImpl.HDR_BRIDGE_DUPLICATE_ID,
someDuplicateInfo.getBytes());
+ if (isSimulateBridge)
+ {
+ clientFile.putBytesProperty(MessageImpl.HDR_BRIDGE_DUPLICATE_ID,
someDuplicateInfo.getBytes());
+ }
+ else
+ {
+ clientFile.putBytesProperty(Message.HDR_DUPLICATE_DETECTION_ID,
someDuplicateInfo.getBytes());
+ }
producer.send(clientFile);
}