diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-10-04 08:29:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-10-04 09:59:15 +0200 |
commit | 43aef04d77aafb9d055957642e62b559231f3711 (patch) | |
tree | a182861d34deb27f8f909795101670aa742a724b /uitest/libreoffice | |
parent | 479151c6e194bdf40a0c15a0676460eb94293601 (diff) |
Reliably wait for soffice to terminate
...to avoid leftover soffice-related processes (oosplash, soffice.bin) from
UITests, whose occasional presence on tinderboxes is discussed in the comments
to <https://gerrit.libreoffice.org/#/c/79854/> "uitest: make child soffice
process die when parent dies". Should sucha an soffice-related process fail to
terminate, the UITest will now fail to terminate too, and (a) a developer can
debug the hung processes or (b) a tinderbox can reliably kill all processes (cf.
<https://gerrit.libreoffice.org/plugins/gitiles/lode/+/
bea0738dbadfe8784e5d3c00f533acf101db4e7e%5E%21> "tb_slave_wrapper: trap signal
and kill -9 everything"). This is in line with the waiting in tearDown in
unotest/source/python/org/libreoffice/unotest.py, and with the corresponding
behavior of C++ and Java test frameworks in unotest.
Change-Id: Ieb5c48964428bc05fa8c0f83af9426641d6df693
Reviewed-on: https://gerrit.libreoffice.org/80175
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'uitest/libreoffice')
-rw-r--r-- | uitest/libreoffice/connection.py | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/uitest/libreoffice/connection.py b/uitest/libreoffice/connection.py index 5beb1831820c..12917555a2fe 100644 --- a/uitest/libreoffice/connection.py +++ b/uitest/libreoffice/connection.py @@ -130,19 +130,7 @@ class OfficeConnection: else: self.soffice.terminate() - DEFAULT_SLEEP = 0.1 - time_ = 0 - while time_ < 30: - time_ += DEFAULT_SLEEP - ret = self.soffice.poll() - if ret is not None: - break - time.sleep(DEFAULT_SLEEP) - - if ret is None: - self.soffice.terminate() - - # ret = self.soffice.wait() + ret = self.soffice.wait() self.xContext = None self.socket = None self.soffice = None |