Author: clebert.suconic(a)jboss.com
Date: 2009-11-17 10:55:41 -0500 (Tue, 17 Nov 2009)
New Revision: 8297
Modified:
trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationOrderTest.java
Log:
small fix for transaction ordering
Modified:
trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationOrderTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationOrderTest.java 2009-11-17
10:54:10 UTC (rev 8296)
+++
trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationOrderTest.java 2009-11-17
15:55:41 UTC (rev 8297)
@@ -40,7 +40,7 @@
public class ReplicationOrderTest extends FailoverTestBase
{
- public static final int NUM = 100;
+ public static final int NUM = 300;
// Constants -----------------------------------------------------
@@ -92,12 +92,24 @@
}
session.createQueue(address, queue, true);
ClientProducer producer = session.createProducer(address);
+ boolean durable = true;
for (int i = 0; i < NUM; i++)
{
- boolean durable = (i % 2 == 0);
ClientMessage msg = session.createClientMessage(durable);
msg.putIntProperty("counter", i);
producer.send(msg);
+ if (transactional)
+ {
+ if (i % 10 == 0)
+ {
+ session.commit();
+ durable = !durable;
+ }
+ }
+ else
+ {
+ durable = !durable;
+ }
}
if (transactional)
{