diff options
author | Neale Ranns <nranns@cisco.com> | 2018-07-23 05:35:56 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2018-07-24 16:44:52 +0000 |
commit | 16782368979b3af7918e54b6998c0b14dbb16da2 (patch) | |
tree | 033eab8014d1ac23099139c042b7825a3ce5ea84 /test | |
parent | 006e6f8add638fab16f7adc099d46d3bfb0efb9a (diff) |
test frame work pump thread exit: set flag then wake
Change-Id: Id95b8a7ad1bf550f615c50d77b16a530cc8fc2c4
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/framework.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/framework.py b/test/framework.py index 4ecb66fe408..d0191c0dd45 100644 --- a/test/framework.py +++ b/test/framework.py @@ -83,7 +83,7 @@ def pump_output(testclass): """ pump output from vpp stdout/stderr to proper queues """ stdout_fragment = "" stderr_fragment = "" - while not testclass.pump_thread_stop_flag.wait(0): + while not testclass.pump_thread_stop_flag.is_set(): readable = select.select([testclass.vpp.stdout.fileno(), testclass.vpp.stderr.fileno(), testclass.pump_thread_wakeup_pipe[0]], @@ -391,8 +391,8 @@ class VppTestCase(unittest.TestCase): raw_input("When done debugging, press ENTER to kill the " "process and finish running the testcase...") - os.write(cls.pump_thread_wakeup_pipe[1], 'ding dong wake up') cls.pump_thread_stop_flag.set() + os.write(cls.pump_thread_wakeup_pipe[1], 'ding dong wake up') if hasattr(cls, 'pump_thread'): cls.logger.debug("Waiting for pump thread to stop") cls.pump_thread.join() |