Nir Soffer has posted comments on this change.
Change subject: Run pinger in separate process ......................................................................
Patch Set 2:
(2 comments)
.................................................... File tests/functional/ping.py Line 1: import time Line 2: from vdsm import vdscli Line 3: Line 4: client = vdscli.connect() Well
server = vdscli.connect()
Is confusing - am I serving something?
How about:
con = vdscli.connect()
connect returns a connection - common pattern. Line 5: Line 6: try: Line 7: while True: Line 8: client.ping()
.................................................... File tests/functional/utils.py Line 175: @contextmanager Line 176: def pinger(self): Line 177: """Keeps pinging vdsm for operations that need it""" Line 178: path = os.path.join(os.path.dirname(__file__), 'ping.py') Line 179: pinger = utils.execCmd([constants.EXT_PYTHON, path], sync=False) May be simpler code in the tests, much more complex code under the hood, for no reason. I think we should use the simplest solution for the tests. If we need to simplify, we can add a function for running such test scripts. Line 180: try: Line 181: yield Line 182: finally: Line 183: pinger.kill()