Author: jicken
Date: 2011-05-31 17:51:56 -0400 (Tue, 31 May 2011)
New Revision: 10756
Modified:
branches/Branch_2_2_EAP_export_tool/tests/src/org/hornetq/tests/integration/persistence/ExportDataTest.java
Log:
added a check for the size of the message body
Modified:
branches/Branch_2_2_EAP_export_tool/tests/src/org/hornetq/tests/integration/persistence/ExportDataTest.java
===================================================================
---
branches/Branch_2_2_EAP_export_tool/tests/src/org/hornetq/tests/integration/persistence/ExportDataTest.java 2011-05-31
21:39:47 UTC (rev 10755)
+++
branches/Branch_2_2_EAP_export_tool/tests/src/org/hornetq/tests/integration/persistence/ExportDataTest.java 2011-05-31
21:51:56 UTC (rev 10756)
@@ -39,6 +39,7 @@
public class ExportDataTest extends ServiceTestBase {
protected static HornetQJMSConnectionFactory myCf;
+ private static final int MSG_SIZE = 1024;
public void testExportImport() throws Exception {
@@ -65,7 +66,7 @@
ClientMessage msg = session.createMessage(true);
msg.putStringProperty("prop", "TST1");
msg.putIntProperty("count", i);
- for (int b = 0; b < 1024; b++)
+ for (int b = 0; b < MSG_SIZE; b++)
{
msg.getBodyBuffer().writeByte(getSamplebyte(b));
}
@@ -117,6 +118,7 @@
{
ClientMessage msg = cons.receive(1000);
assertNotNull(msg);
+ assertEquals(MSG_SIZE, msg.getBodyBuffer().readableBytes());
for (int b = 0; b < msg.getBodyBuffer().readableBytes(); b++) {
assertEquals(getSamplebyte(b), msg.getBodyBuffer().readByte());
}
Show replies by date