[Libreoffice-commits] online.git: 3 commits - kit/ForKit.cpp test/Makefile.am test/UnitPrefork.cpp wsd/LOOLWSD.cpp

Michael Meeks michael.meeks at collabora.com
Thu Mar 30 20:59:24 UTC 2017


 kit/ForKit.cpp       |    2 ++
 test/Makefile.am     |    2 +-
 test/UnitPrefork.cpp |    5 +++--
 wsd/LOOLWSD.cpp      |    7 +++++--
 4 files changed, 11 insertions(+), 5 deletions(-)

New commits:
commit f20e931b29ebea0778e72892c9357ef9ae809557
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Thu Mar 30 21:55:33 2017 +0100

    Re-enable UnitPrefork.

diff --git a/test/Makefile.am b/test/Makefile.am
index c55c306f..9008efa1 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -74,7 +74,7 @@ check-local:
 	./run_unit.sh --log-file test.log --trs-file test.trs
 # FIXME 2: unit-oob.la fails with symbol undefined:
 # UnitWSD::testHandleRequest(UnitWSD::TestRequest, UnitHTTPServerRequest&, UnitHTTPServerResponse&) ,
-TESTS = # unit-prefork.la # unit-tilecache.la unit-storage.la unit-timeout.la unit-admin.la unit-minsocketbuffersize.la
+TESTS = unit-prefork.la # unit-tilecache.la unit-storage.la unit-timeout.la unit-admin.la unit-minsocketbuffersize.la
 else
 TESTS = ${top_builddir}/test/test
 endif
diff --git a/test/UnitPrefork.cpp b/test/UnitPrefork.cpp
index 841fbd37..90852a69 100644
--- a/test/UnitPrefork.cpp
+++ b/test/UnitPrefork.cpp
@@ -27,9 +27,10 @@ public:
         setTimeout(60 * 1000);
     }
 
-    virtual void configure(Poco::Util::LayeredConfiguration& /* config */) override
+    virtual void configure(Poco::Util::LayeredConfiguration& config) override
     {
-        LOOLWSD::NumPreSpawnedChildren = NumToPrefork;
+        config.setInt("num_prespawn_children", NumToPrefork);
+        UnitWSD::configure(config);
     }
 
     virtual void newChild(WebSocketHandler &) override
commit a2398fc367eafdcec9dce99765b2671b339ce19a
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Thu Mar 30 21:55:17 2017 +0100

    Improve debugging information.

diff --git a/kit/ForKit.cpp b/kit/ForKit.cpp
index 62c34c57..59da5d64 100644
--- a/kit/ForKit.cpp
+++ b/kit/ForKit.cpp
@@ -341,6 +341,8 @@ int main(int argc, char** argv)
     SigUtil::setTerminationSignals();
 #endif
 
+    Util::setThreadName("forkit");
+
     // Initialization
     const bool logToFile = std::getenv("LOOL_LOGFILE");
     const char* logFilename = std::getenv("LOOL_LOGFILENAME");
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 3adf744a..f8bfc661 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -347,6 +347,8 @@ static int rebalanceChildren(int balance)
 {
     Util::assertIsLocked(NewChildrenMutex);
 
+    LOG_WRN("rebalance children to " << balance);
+
     // Do the cleanup first.
     const bool rebalance = cleanupChildren();
 
@@ -2177,7 +2179,8 @@ public:
            << "  TerminationFlag: " << TerminationFlag << "\n"
            << "  isShuttingDown: " << ShutdownRequestFlag << "\n"
            << "  NewChildren: " << NewChildren.size() << "\n"
-           << "  OutstandingForks: " << OutstandingForks << "\n";
+           << "  OutstandingForks: " << OutstandingForks << "\n"
+           << "  NumPreSpawnedChildren: " << LOOLWSD::NumPreSpawnedChildren << "\n";
 
         os << "Server poll:\n";
         _acceptPoll.dumpState(os);
commit eab89a0e709b1d61daa4844706641e0092310371
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Thu Mar 30 21:54:40 2017 +0100

    Fix unit test delay time check.

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 877d7ccc..3adf744a 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2418,7 +2418,7 @@ int LOOLWSD::innerMain()
 
         // Unit test timeout
         if (std::chrono::duration_cast<std::chrono::milliseconds>(
-                std::chrono::steady_clock::now() - startStamp).count() <
+                std::chrono::steady_clock::now() - startStamp).count() >
             UnitWSD::get().getTimeoutMilliSeconds())
             UnitWSD::get().timeout();
 


More information about the Libreoffice-commits mailing list