summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/ha_test.py
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2014-05-01 22:20:26 +0000
committerAlan Conway <aconway@apache.org>2014-05-01 22:20:26 +0000
commite57cd3393b842e40f9da989ab4d60142682ba73e (patch)
tree60cca2b0edc4c7aaa9645f8c5a8dd879bff3eb79 /qpid/cpp/src/tests/ha_test.py
parent7c0d7cd95d3cbf691e5d0e39be3fe10dce340040 (diff)
downloadqpid-python-e57cd3393b842e40f9da989ab4d60142682ba73e.tar.gz
NO-JIRA: HA fix hanging ha_tests.test_failover_send_receive on RHEL5
The test was hanging because of a python construct not available in 2.4. It was causing an exception in a strange place because this bit of code was imported at runtime, and that was hanging the test. Fixed and did some cleanup to avoid such mysterious hangs in future: - Fixed qpidtoollibs/config.py to work with python 2.4. - Import qpid-ha script at import time rather than runtime. - Fix Popen.teardown logic to avoid hanging if a process can't be killed. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1591794 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/ha_test.py')
-rwxr-xr-xqpid/cpp/src/tests/ha_test.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/qpid/cpp/src/tests/ha_test.py b/qpid/cpp/src/tests/ha_test.py
index fe1894ecc8..f09a4cd573 100755
--- a/qpid/cpp/src/tests/ha_test.py
+++ b/qpid/cpp/src/tests/ha_test.py
@@ -153,15 +153,15 @@ acl allow all all
if not "--acl-file" in args:
args += [ "--acl-file", acl, ]
args += ["--socket-fd=%s"%ha_port.fileno, "--listen-disable=tcp"]
- Broker.__init__(self, test, args, port=ha_port.port, **kwargs)
- self.qpid_ha_path=os.path.join(os.getenv("PYTHON_COMMANDS"), "qpid-ha")
- assert os.path.exists(self.qpid_ha_path)
- self.qpid_config_path=os.path.join(os.getenv("PYTHON_COMMANDS"), "qpid-config")
- assert os.path.exists(self.qpid_config_path)
- self.qpid_ha_script=import_script(self.qpid_ha_path)
self._agent = None
self.client_credentials = client_credentials
self.ha_port = ha_port
+ Broker.__init__(self, test, args, port=ha_port.port, **kwargs)
+
+ # Do some static setup to locate the qpid-config and qpid-ha tools.
+ qpid_ha_script=import_script(os.path.join(os.getenv("PYTHON_COMMANDS"),"qpid-ha"))
+ qpid_config_path=os.path.join(os.getenv("PYTHON_COMMANDS"), "qpid-config")
+ assert os.path.isfile(qpid_config_path)
def __repr__(self): return "<HaBroker:%s:%d>"%(self.log, self.port())