[Libreoffice-commits] online.git: test/countloolkits.hpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Mon Jan 30 02:08:57 UTC 2017
test/countloolkits.hpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit 9a8fe7054adebb22575f1452825f9843e953d9e3
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sun Jan 29 14:04:54 2017 -0500
wsd: more time to count lool processes
In unittests we need to count the
number of lool processes. This can
take a long time depending on how many
they are and if they are exiting or
new ones being created.
New logic is to reset the timeout
when the numbers are changing until
it settles on either the expected
(when we return), or some other value.
Change-Id: Ia8fcc7ef60586ebec6d8a280174b4dd2eae0ccc4
Reviewed-on: https://gerrit.libreoffice.org/33672
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/test/countloolkits.hpp b/test/countloolkits.hpp
index a652bfd..d38ac82 100644
--- a/test/countloolkits.hpp
+++ b/test/countloolkits.hpp
@@ -100,7 +100,13 @@ static int countLoolKitProcesses(const int expected)
// Give polls in the lool processes time to time out etc
std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs));
- count = getLoolKitProcessCount();
+ const auto newCount = getLoolKitProcessCount();
+ if (count != newCount)
+ {
+ // Allow more time until the number settles.
+ i = 0;
+ count = newCount;
+ }
}
std::cerr << std::endl;
More information about the Libreoffice-commits
mailing list