summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/qpid-txtest.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2014-04-23 21:11:08 +0000
committerAlan Conway <aconway@apache.org>2014-04-23 21:11:08 +0000
commit8e0913a48177df57c4e0312bcfb7c5ee8dcdb327 (patch)
tree45af98b3fc04506dc8c84a4d1356078cb4782cdf /qpid/cpp/src/tests/qpid-txtest.cpp
parent75f9e37431ec7d7ca112012e322133db76808df4 (diff)
downloadqpid-python-8e0913a48177df57c4e0312bcfb7c5ee8dcdb327.tar.gz
QPID-5720: HA exception raised by the store for durable transactions
Running qpid-txtest against a HA cluster was raising this exception: async_dequeue() failed: jexception 0x0b02 wmgr::dequeue_check() threw JERR_MAP_LOCKED: Record ID locked by a pending transaction. This is actually a test bug. In a cluster a transaction commit takes longer to complete because of co-ordinating with backups, the test was not waiting for the completion of commit command before proceeding. Adding a sync() in the test solves the problem. Note this test uses the old obsolete C++ API. Applications written using the supported messaging API are not affected by this. This can be verified using the qpid-send and qpid-receive clients with the --tx option (there is already an automated test for this in ha_tests.py.) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1589520 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/qpid-txtest.cpp')
-rw-r--r--qpid/cpp/src/tests/qpid-txtest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/qpid-txtest.cpp b/qpid/cpp/src/tests/qpid-txtest.cpp
index 6e7d46802c..59ab905af7 100644
--- a/qpid/cpp/src/tests/qpid-txtest.cpp
+++ b/qpid/cpp/src/tests/qpid-txtest.cpp
@@ -179,6 +179,7 @@ struct Transfer : public Client, public Runnable
} else {
session.txCommit();
}
+ session.sync();
}
} catch(const std::exception& e) {
std::cout << "Transfer interrupted: " << e.what() << std::endl;