summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2015-05-19 23:27:36 +0000
committerAlan Conway <aconway@apache.org>2015-05-19 23:27:36 +0000
commit359a46242dee2cff9fcbb1783ef0b48fccadeb14 (patch)
tree5f8e964bef54cdea996206d4a71c8564c3d8f9fa /cpp
parent8a47e2ca2d735ef54dc0be6cb4d8c21c60a8e5fa (diff)
downloadqpid-python-359a46242dee2cff9fcbb1783ef0b48fccadeb14.tar.gz
NO-JIRA: Fix test bugs in ha_tests and interop_test
Race conditions in ha_tests. Typo in skip logic for interop_test when recent proton not available. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1680422 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rwxr-xr-xcpp/src/tests/ha_tests.py2
-rwxr-xr-xcpp/src/tests/interop_tests.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/tests/ha_tests.py b/cpp/src/tests/ha_tests.py
index d0d713e34a..2ee2e291e2 100755
--- a/cpp/src/tests/ha_tests.py
+++ b/cpp/src/tests/ha_tests.py
@@ -674,6 +674,7 @@ acl deny all all
s.acknowledge(msg, qm.Disposition(qm.REJECTED)) # Reject the message
self.assertEqual("bar", altq.fetch(timeout=0).content)
s.acknowledge()
+ s.sync() # Make sure backups are caught-up.
c.close()
# Sanity check: alternate exchanges on original broker
@@ -885,6 +886,7 @@ acl deny all all
qs = ["q%s"%i for i in xrange(10)]
a = cluster[0].agent
a.addQueue("q")
+ cluster[1].wait_backup("q")
cluster.kill(0)
cluster[1].promote()
cluster[1].wait_status("active")
diff --git a/cpp/src/tests/interop_tests.py b/cpp/src/tests/interop_tests.py
index d5533ead21..f76b9f634b 100755
--- a/cpp/src/tests/interop_tests.py
+++ b/cpp/src/tests/interop_tests.py
@@ -195,7 +195,7 @@ if __name__ == "__main__":
if not BrokerTest.amqp_tx_supported:
BrokerTest.amqp_tx_warning()
print "Skipping interop_tests"
- exit(0)
+ sys.exit(0)
outdir = "interop_tests.tmp"
shutil.rmtree(outdir, True)
cmd = ["qpid-python-test", "-m", "interop_tests", "-DOUTDIR=%s"%outdir] + sys.argv[1:]