test/countloolkits.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit 9a8fe7054adebb22575f1452825f9843e953d9e3 Author: Ashod Nakashian <[email protected]> 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 <[email protected]> Tested-by: Ashod Nakashian <[email protected]> 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; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
