[hornetq-commits] JBoss hornetq SVN: r9072 - trunk/tests/src/org/hornetq/tests/integration/cluster/failover.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Apr 7 18:33:56 EDT 2010
Author: clebert.suconic at jboss.com
Date: 2010-04-07 18:33:56 -0400 (Wed, 07 Apr 2010)
New Revision: 9072
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/LargeMessageFailoverTest.java
Log:
speeding up one of the LargeMessage tests
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/LargeMessageFailoverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/LargeMessageFailoverTest.java 2010-04-07 22:06:03 UTC (rev 9071)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/LargeMessageFailoverTest.java 2010-04-07 22:33:56 UTC (rev 9072)
@@ -17,7 +17,7 @@
import org.hornetq.api.core.HornetQBuffer;
import org.hornetq.api.core.client.ClientMessage;
-import org.hornetq.api.core.client.HornetQClient;
+import org.hornetq.core.client.impl.ClientSessionFactoryInternal;
import org.hornetq.core.logging.Logger;
import org.hornetq.tests.util.UnitTestCase;
@@ -36,6 +36,10 @@
private static final Logger log = Logger.getLogger(LargeMessageFailoverTest.class);
+ private static final int MIN_LARGE_MESSAGE = 1024;
+
+ private static final int LARGE_MESSAGE_SIZE = MIN_LARGE_MESSAGE * 3;
+
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
@@ -73,12 +77,22 @@
{
HornetQBuffer buffer = message.getBodyBuffer();
- for (int j = 0; j < HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE * 3; j++)
+ for (int j = 0; j < LARGE_MESSAGE_SIZE; j++)
{
Assert.assertEquals("equal at " + j, buffer.readByte(), UnitTestCase.getSamplebyte(j));
}
}
+
+ protected ClientSessionFactoryInternal getSessionFactory()
+ {
+ ClientSessionFactoryInternal sf = super.getSessionFactory();
+ sf.setMinLargeMessageSize(LARGE_MESSAGE_SIZE);
+ return sf;
+ }
+
+
+
/**
* @param i
* @param message
@@ -86,7 +100,7 @@
@Override
protected void setBody(final int i, final ClientMessage message) throws Exception
{
- message.setBodyInputStream(UnitTestCase.createFakeLargeStream(HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE * 3));
+ message.setBodyInputStream(UnitTestCase.createFakeLargeStream(LARGE_MESSAGE_SIZE));
}
// Private -------------------------------------------------------
More information about the hornetq-commits
mailing list