Author: gaohoward
Date: 2010-11-12 00:23:35 -0500 (Fri, 12 Nov 2010)
New Revision: 9879
Modified:
branches/Branch_Large_Message_Compression/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java
Log:
test
Modified:
branches/Branch_Large_Message_Compression/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java
===================================================================
---
branches/Branch_Large_Message_Compression/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java 2010-11-12
04:51:39 UTC (rev 9878)
+++
branches/Branch_Large_Message_Compression/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java 2010-11-12
05:23:35 UTC (rev 9879)
@@ -2697,6 +2697,7 @@
server.start();
ClientSessionFactory sf = createFactory(isNetty());
+ sf.setCompressLargeMessages(true);
session = sf.createSession(false, false, false);
@@ -2714,21 +2715,22 @@
ClientConsumer consumer = session.createConsumer(LargeMessageTest.ADDRESS);
ClientMessage msg1 = consumer.receive(1000);
+ Assert.assertNotNull(msg1);
+
+ for (int i = 0 ; i < messageSize; i++)
+ {
+ //System.out.print(msg1.getBodyBuffer().readByte() + " ");
+ //if (i % 100 == 0) System.out.println();
+ byte b = msg1.getBodyBuffer().readByte();
+ //System.out.println("Byte read: " + (char)b + " i " +
i);
+ assertEquals("position = " + i, getSamplebyte(i), b);
+ }
+
msg1.acknowledge();
session.commit();
- Assert.assertNotNull(msg1);
consumer.close();
- try
- {
- msg1.getBodyBuffer().readByte();
- Assert.fail("Exception was expected");
- }
- catch (Throwable ignored)
- {
- }
-
session.close();
validateNoFilesOnLargeDir();