diff options
-rw-r--r-- | test/Makefile.am | 2 | ||||
-rw-r--r-- | wsd/LOOLWSD.cpp | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 41aa678105..c70bfe84d1 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -72,7 +72,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-timeout.la # unit-storage.la unit-admin.la +TESTS = unit-prefork.la unit-tilecache.la unit-timeout.la # unit-storage.la unit-admin.la else TESTS = ${top_builddir}/test/test endif diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index e51bf921a1..db5f55a23a 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -2419,7 +2419,10 @@ int LOOLWSD::innerMain() UnitWSD::get().invokeTest(); // This timeout affects the recovery time of prespawned children. - mainWait.poll(SocketPoll::DefaultPollTimeoutMs * 4); + int msWait = UnitWSD::isUnitTesting() ? + UnitWSD::get().getTimeoutMilliSeconds() / 4 : + SocketPoll::DefaultPollTimeoutMs * 4; + mainWait.poll(msWait); // Wake the prisoner poll to spawn some children, if necessary. PrisonerPoll.wakeup(); |