[Libreoffice-commits] core.git: uitest/libreoffice

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri Oct 4 07:59:50 UTC 2019


 uitest/libreoffice/connection.py |   14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

New commits:
commit 43aef04d77aafb9d055957642e62b559231f3711
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Oct 4 08:29:06 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Oct 4 09:59:15 2019 +0200

    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 at redhat.com>

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


More information about the Libreoffice-commits mailing list