Updated Branches: refs/heads/trunk db8de8bb9 -> 5feb3ca58
Fix some bugs that were generating error messages in the tests. Project: http://git-wip-us.apache.org/repos/asf/activemq-apollo/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-apollo/commit/1831367f Tree: http://git-wip-us.apache.org/repos/asf/activemq-apollo/tree/1831367f Diff: http://git-wip-us.apache.org/repos/asf/activemq-apollo/diff/1831367f Branch: refs/heads/trunk Commit: 1831367ffb2e3920cfae5a167bdcd059bc5825c7 Parents: db8de8b Author: Hiram Chirino <[email protected]> Authored: Fri Jan 31 11:13:43 2014 -0500 Committer: Hiram Chirino <[email protected]> Committed: Fri Jan 31 11:13:43 2014 -0500 ---------------------------------------------------------------------- .../activemq/apollo/stomp/StompProtocolHandler.scala | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-apollo/blob/1831367f/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala ---------------------------------------------------------------------- diff --git a/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala b/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala index f928a0e..bf1a0ca 100644 --- a/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala +++ b/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala @@ -1759,8 +1759,10 @@ class StompProtocolHandler extends ProtocolHandler { val txid = require_transaction_header(headers) val tx = transactions.get(txid).getOrElse(die("transaction not active: %d".format(txid))) tx.commit { - remove_tx_queue(txid) - send_receipt(headers) + queue { + remove_tx_queue(txid) + send_receipt(headers) + } } } @@ -1837,7 +1839,7 @@ class StompProtocolHandler extends ProtocolHandler { def create_tx_queue(txid:AsciiBuffer):TransactionQueue = { if ( transactions.contains(txid) ) { - die("transaction allready started") + die("transaction already started") } else { val queue = new TransactionQueue transactions.put(txid, queue) @@ -1850,7 +1852,7 @@ class StompProtocolHandler extends ProtocolHandler { } def remove_tx_queue(txid:AsciiBuffer):TransactionQueue = { - transactions.remove(txid).getOrElse(die("transaction not active: %d".format(txid))) + transactions.remove(txid).getOrElse(die("transaction not active: %s".format(txid))) } }
