[Libreoffice-commits] online.git: loolwsd/test loolwsd/Unit.cpp
Michael Meeks
michael.meeks at collabora.com
Wed Oct 5 21:38:30 UTC 2016
loolwsd/Unit.cpp | 1 +
loolwsd/test/UnitPrefork.cpp | 14 ++------------
2 files changed, 3 insertions(+), 12 deletions(-)
New commits:
commit d3daa2d9d952a9dceca9b171859f8deea124998f
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Wed Oct 5 22:36:40 2016 +0100
Mend UnitPrefork.
Count pre-forked processes more correctly.
Use Unit's returnValue implementation to fix failure exit codes.
Accept new loolwsd.log socket as being authentic.
diff --git a/loolwsd/Unit.cpp b/loolwsd/Unit.cpp
index 6c050cf..5eb7fb6 100644
--- a/loolwsd/Unit.cpp
+++ b/loolwsd/Unit.cpp
@@ -164,6 +164,7 @@ void UnitBase::exitTest(TestResult result)
void UnitBase::timeout()
{
+ Log::error("Timed out waiting for unit test to complete");
exitTest(TestResult::TEST_TIMED_OUT);
}
diff --git a/loolwsd/test/UnitPrefork.cpp b/loolwsd/test/UnitPrefork.cpp
index e2522a5..d3c2804 100644
--- a/loolwsd/test/UnitPrefork.cpp
+++ b/loolwsd/test/UnitPrefork.cpp
@@ -50,17 +50,6 @@ public:
setHasKitHooks();
}
- virtual void returnValue(int &retValue) override
- {
- // 0 when empty (success), otherwise failure.
- if (!_failure.empty())
- {
- Log::error("UnitPrefork failed due to: " + _failure);
- }
-
- retValue = !_failure.empty();
- }
-
virtual void preSpawnCount(int &numPrefork) override
{
numPrefork = NumToPrefork;
@@ -111,7 +100,7 @@ public:
virtual void newChild(const std::shared_ptr<Poco::Net::WebSocket> &socket) override
{
_childSockets.push_back(socket);
- if (_childSockets.size() > NumToPrefork)
+ if (_childSockets.size() >= NumToPrefork)
{
Poco::Timestamp::TimeDiff elapsed = _startTime.elapsed();
@@ -260,6 +249,7 @@ public:
else if (extDot && !strcmp(extDot, ".rdb"))
rdbCount++;
else if (strstr(buffer, "unit-prefork.log") || // our log
+ strstr(buffer, "loolwsd.log") || // debug log
(strstr(buffer, "/proc/") && // our readdir
strstr(buffer, "/fd")))
; // ignore
More information about the Libreoffice-commits
mailing list