[jboss-cvs] JBoss Messaging SVN: r1463 - in trunk: src/main/org/jboss/messaging/core/plugin/postoffice/cluster tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 10 05:45:21 EDT 2006
Author: timfox
Date: 2006-10-10 05:45:16 -0400 (Tue, 10 Oct 2006)
New Revision: 1463
Modified:
trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/CastMessagesCallback.java
trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java
trunk/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RecoveryTest.java
Log:
more on recovery
Modified: trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/CastMessagesCallback.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/CastMessagesCallback.java 2006-10-10 03:17:12 UTC (rev 1462)
+++ trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/CastMessagesCallback.java 2006-10-10 09:45:16 UTC (rev 1463)
@@ -191,6 +191,7 @@
//Only used in testing
if (failAfterCommit)
{
+ log.info("Forcing failure after commit");
throw new TransactionException("Forced failure for testing");
}
Modified: trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java 2006-10-10 03:17:12 UTC (rev 1462)
+++ trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java 2006-10-10 09:45:16 UTC (rev 1463)
@@ -835,10 +835,10 @@
if (id.getNodeId() == nodeId.intValue())
{
- ClusterTransaction tx = (ClusterTransaction)iter.next();
+ ClusterTransaction tx = (ClusterTransaction)entry.getValue();
if (trace) { log.trace("Found transaction " + tx + " in holding area"); }
-
+
boolean commit = tx.check(this);
if (trace) { log.trace(this.nodeId + " transaction " + tx + " will be committed?: " + commit); }
@@ -852,7 +852,7 @@
tx.rollback(this);
}
- toRemove.add(tx);
+ toRemove.add(id);
if (trace) { log.trace(this.nodeId + " resolved " + tx); }
}
Modified: trunk/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RecoveryTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RecoveryTest.java 2006-10-10 03:17:12 UTC (rev 1462)
+++ trunk/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RecoveryTest.java 2006-10-10 09:45:16 UTC (rev 1463)
@@ -159,8 +159,7 @@
assertTrue(office2.getHoldingTransactions().isEmpty());
//The tx should be removed from the holding area and nothing should be received
- msgs = receiver1.getMessages();
- assertTrue(msgs.isEmpty());
+ //remember node1 has now crashed so no point checking receiver1
msgs = receiver2.getMessages();
assertTrue(msgs.isEmpty());
@@ -259,8 +258,7 @@
assertTrue(office2.getHoldingTransactions().isEmpty());
//The tx should be removed from the holding area and messages be received
- msgs = receiver1.getMessages();
- assertEquals(NUM_MESSAGES, msgs.size());
+ //no point checking receiver1 since node1 has crashed
msgs = receiver2.getMessages();
assertEquals(NUM_MESSAGES, msgs.size());
@@ -280,7 +278,6 @@
}
}
-
protected ClusteredPostOffice createClusteredPostOffice(int nodeId, String groupName) throws Exception
{
MessagePullPolicy redistPolicy = new NullMessagePullPolicy();
More information about the jboss-cvs-commits
mailing list