Kaydet (Commit) 98cbfb08 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

uitest: kill the LibreOffice instance if it ignores terminate request

Change-Id: I47c69878ebaa834eb75208ce8e5c26544e3e62bd
üst 7f2d8b1d
......@@ -93,7 +93,22 @@ class OfficeConnection:
pass # ignore
else:
self.soffice.terminate()
ret = self.soffice.wait()
DEFAULT_SLEEP = 0.1
time_ = 0
while time_ < 5:
time_ += DEFAULT_SLEEP
ret_attr = self.soffice.poll()
if ret_attr is not None:
break
time.sleep(DEFAULT_SLEEP)
ret = 0
if ret_attr is None:
ret = 1
self.soffice.terminate()
# ret = self.soffice.wait()
self.xContext = None
self.socket = None
self.soffice = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment