Author: aconway
Date: Fri Dec  7 18:09:26 2012
New Revision: 1418417

URL: http://svn.apache.org/viewvc?rev=1418417&view=rev
Log:
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".

Modified:
    qpid/trunk/qpid/cpp/src/tests/brokertest.py

Modified: qpid/trunk/qpid/cpp/src/tests/brokertest.py
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/brokertest.py?rev=1418417&r1=1418416&r2=1418417&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/brokertest.py (original)
+++ qpid/trunk/qpid/cpp/src/tests/brokertest.py Fri Dec  7 18:09:26 2012
@@ -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:



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to