loolwsd/test/countloolkits.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit a007a7c1d45088a59c2ea0d0ade1410463e3243d Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Fri Apr 29 17:16:53 2016 -0400 loolwsd: improved LoKit process counting Change-Id: I514ece4ce7f401a8996bc115ab00ddb7a8bec90d Reviewed-on: https://gerrit.libreoffice.org/24501 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/test/countloolkits.hpp b/loolwsd/test/countloolkits.hpp index c81bf98..c9ca40f 100644 --- a/loolwsd/test/countloolkits.hpp +++ b/loolwsd/test/countloolkits.hpp @@ -68,7 +68,7 @@ int getLoolKitProcessCount() static int countLoolKitProcesses(const int expected, const int timeoutMs = POLL_TIMEOUT_MS * 10) { - const size_t repeat = (timeoutMs + POLL_TIMEOUT_MS - 1) / POLL_TIMEOUT_MS; + const size_t repeat = 1 + (timeoutMs / POLL_TIMEOUT_MS); auto count = getLoolKitProcessCount(); for (size_t i = 0; i < repeat; ++i) { @@ -83,6 +83,11 @@ int countLoolKitProcesses(const int expected, const int timeoutMs = POLL_TIMEOUT count = getLoolKitProcessCount(); } + if (expected != count) + { + std::cerr << "Found " << count << " LoKit processes but was expecting " << expected << "." << std::endl; + } + return count; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits