[Libreoffice-commits] online.git: loolwsd/test
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Mon Apr 11 03:12:44 UTC 2016
loolwsd/test/UnitPrefork.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit abca88c7cf03a850546431cea54cfdbdc5dc1e71
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sun Apr 10 22:29:49 2016 -0400
loolwsd: correction to prefork unit-test
Since WSD now takes into account the fact that
ForKit always spawns one child, the unit-test
shouldn't expect +1 preforked children.
Change-Id: I5cbe9d817a0d2ffdf9fb0953ef85450f7b8b224f
Reviewed-on: https://gerrit.libreoffice.org/23980
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/test/UnitPrefork.cpp b/loolwsd/test/UnitPrefork.cpp
index a79e593..b9239f7 100644
--- a/loolwsd/test/UnitPrefork.cpp
+++ b/loolwsd/test/UnitPrefork.cpp
@@ -24,6 +24,7 @@ class UnitPrefork : public UnitWSD
int _numStarted;
const int _numToPrefork;
Timestamp _startTime;
+
public:
UnitPrefork()
: _numStarted(0),
@@ -31,14 +32,16 @@ public:
{
setHasKitHooks();
}
+
virtual void preSpawnCount(int &numPrefork) override
{
numPrefork = _numToPrefork;
}
+
virtual void newChild() override
{
- _numStarted++;
- if (_numStarted >= _numToPrefork + 1)
+ ++_numStarted;
+ if (_numStarted >= _numToPrefork)
{
exitTest(TestResult::TEST_OK);
More information about the Libreoffice-commits
mailing list