mirror of
https://github.com/LibreOffice/online.git
synced 2025-08-20 23:24:34 +00:00
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@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:

committed by
Ashod Nakashian

parent
78fdcb903a
commit
9a8fe7054a
@ -100,7 +100,13 @@ static int countLoolKitProcesses(const int expected)
|
|||||||
// Give polls in the lool processes time to time out etc
|
// Give polls in the lool processes time to time out etc
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs));
|
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;
|
std::cerr << std::endl;
|
||||||
|
Reference in New Issue
Block a user