From 43aef04d77aafb9d055957642e62b559231f3711 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 4 Oct 2019 08:29:06 +0200 Subject: 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 "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. "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 --- uitest/libreoffice/connection.py | 14 +------------- 1 file changed, 1 insertion(+), 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 -- cgit