summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-12-07 18:09:26 +0000
committerAlan Conway <aconway@apache.org>2012-12-07 18:09:26 +0000
commitf02ec7a0bab8326b4b681ad4af822a166bd0cc90 (patch)
treeb0632ec71ceef031c6c78c8fba917b3cafd75c62 /cpp
parentab9637bce19343bdb0b3625226419de2e3915674 (diff)
downloadqpid-python-f02ec7a0bab8326b4b681ad4af822a166bd0cc90.tar.gz
NO-JIRA: Fix race condition in brokertest.py test harness.
Fixed a race conndition that was causing false failures of the form "expected an error". git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1418417 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/tests/brokertest.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/tests/brokertest.py b/cpp/src/tests/brokertest.py
index 0597a933a3..24f4bcadf9 100644
--- a/cpp/src/tests/brokertest.py
+++ b/cpp/src/tests/brokertest.py
@@ -203,7 +203,9 @@ class Popen(subprocess.Popen):
self.wait()
def kill(self):
- self.expect = EXPECT_EXIT_FAIL
+ # Set to EXPECT_UNKNOWN, EXPECT_EXIT_FAIL creates a race condition
+ # if the process exits normally concurrent with the call to kill.
+ self.expect = EXPECT_UNKNOWN
try: subprocess.Popen.kill(self)
except AttributeError: # No terminate method
try: