diff options
author | Martin Ritchie <ritchiem@apache.org> | 2007-11-06 11:40:13 +0000 |
---|---|---|
committer | Martin Ritchie <ritchiem@apache.org> | 2007-11-06 11:40:13 +0000 |
commit | 0e1d6881e76a4161177286f65723299a630fec02 (patch) | |
tree | 7c41eadc436df3a72fb94ac3447a8f00ca19ae14 | |
parent | ce669b3a4384737716f1fe63bd166f0687e217c6 (diff) | |
download | qpid-python-0e1d6881e76a4161177286f65723299a630fec02.tar.gz |
QPID-662 Transactional state not correctly reported after fail over. We now record if we have sent any messages
from here we can check if we have failed over and so have lost messages from the transaction making it invalid.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1@592388 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | java/systests/src/main/java/org/apache/qpid/server/txn/TxnTest.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/server/txn/TxnTest.java b/java/systests/src/main/java/org/apache/qpid/server/txn/TxnTest.java index 14d5d249e9..7b1d3d8321 100644 --- a/java/systests/src/main/java/org/apache/qpid/server/txn/TxnTest.java +++ b/java/systests/src/main/java/org/apache/qpid/server/txn/TxnTest.java @@ -351,6 +351,7 @@ public class TxnTest extends TestCase implements MessageListener {
txProducer.send(_clientSession.createTextMessage(MESSAGE_TXT));
txProducer.send(_clientSession.createTextMessage(MESSAGE_TXT));
+ _clientSession.commit();
}
catch (JMSException jmse)
{
@@ -360,6 +361,17 @@ public class TxnTest extends TestCase implements MessageListener }
}
+ received = _consumer.receive(10000);
+ assertNotNull("Message should be received.", received);
+ assertEquals("Incorrect Message Received.", MESSAGE_TXT, ((TextMessage) received).getText());
+
+ received = _consumer.receive(10000);
+ assertNotNull("Message should be received.", received);
+ assertEquals("Incorrect Message Received.", MESSAGE_TXT, ((TextMessage) received).getText());
+
+ //Check that the message isn't received.
+ received = _consumer.receive(1000);
+ assertNull("Additional message received", received);
_consumer.close();
}
|