Enable "wait_until_true" when used ouf the main thread 15/60215/2
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Thu, 26 Jul 2018 14:21:45 +0000 (15:21 +0100)
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Thu, 26 Jul 2018 14:32:46 +0000 (15:32 +0100)
commitb76f841ab41ce2965e6867a04177beb0affd0c10
tree978e2ccd75a655e185ec5f667761233af9759490
parent305b69cc6b840ced701a09bca0435937dcb42723
Enable "wait_until_true" when used ouf the main thread

"util.wait_until_true" uses "util.Timer" to create an active wait for a
condition. "Timer" class uses "signal" to create a watchdog to track the
time lapsed.

When used out of the main thread, "Timer" raises the following error:
  ValueError: signal only works in main thread

To make "util.wait_until_true" usable always, a new waitting method is
implemented.

JIRA: YARDSTICK-1358

Change-Id: Ifb5ba0b17b5beca0af5ceab4f6431d58b7928762
Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
yardstick/common/utils.py
yardstick/tests/unit/common/test_utils.py