diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2023-06-27 17:11:07 -0400 |
---|---|---|
committer | Ashod Nakashian <Ashod@users.noreply.github.com> | 2023-07-08 04:19:00 -0400 |
commit | 1cac1f169840e58d6c53c1b4de3744e0d7c3b062 (patch) | |
tree | c151d72c2c961089aa9915776cd3b1c92c83b466 | |
parent | wsd: no default parameters for DocumentBroker::autoSave (diff) | |
download | online-1cac1f169840e58d6c53c1b4de3744e0d7c3b062.tar.gz online-1cac1f169840e58d6c53c1b4de3744e0d7c3b062.zip |
wsd: test: do not advance to next test on failure
Change-Id: I2831c90e088064f5a254ef8a9809796e8320ed04
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
-rw-r--r-- | common/Unit.cpp | 9 | ||||
-rw-r--r-- | wsd/COOLWSD.cpp | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/common/Unit.cpp b/common/Unit.cpp index 8f2f18f500..42d6edfaf1 100644 --- a/common/Unit.cpp +++ b/common/Unit.cpp @@ -612,7 +612,8 @@ void UnitWSD::DocBrokerDestroy(const std::string& key) GlobalWSD = nullptr; GlobalTool = nullptr; - if (GlobalArray[GlobalIndex] != nullptr) + if (GlobalArray[GlobalIndex] != nullptr && !SigUtil::getShutdownRequestFlag() && + (_result == TestResult::Ok || GlobalTestOptions.getKeepgoing())) { rememberInstance(_type, GlobalArray[GlobalIndex]); @@ -621,10 +622,10 @@ void UnitWSD::DocBrokerDestroy(const std::string& key) if (GlobalWSD) GlobalWSD->configure(Poco::Util::Application::instance().config()); GlobalArray[GlobalIndex]->initialize(); - - // Wake-up so the previous test stops. - SocketPoll::wakeupWorld(); } + + // Wake-up so the previous test stops. + SocketPoll::wakeupWorld(); } } } diff --git a/wsd/COOLWSD.cpp b/wsd/COOLWSD.cpp index dd36535ace..d7a500e8df 100644 --- a/wsd/COOLWSD.cpp +++ b/wsd/COOLWSD.cpp @@ -5815,7 +5815,7 @@ int COOLWSD::innerMain() // This timeout affects the recovery time of prespawned children. std::chrono::microseconds waitMicroS = SocketPoll::DefaultPollTimeoutMicroS * 4; - if (UnitWSD::isUnitTesting()) + if (UnitWSD::isUnitTesting() && !SigUtil::getShutdownRequestFlag()) { UnitWSD::get().invokeTest(); @@ -5834,7 +5834,7 @@ int COOLWSD::innerMain() const std::chrono::milliseconds timeSinceStartMs = std::chrono::duration_cast<std::chrono::milliseconds>(timeNow - startStamp); // Unit test timeout - if (UnitWSD::isUnitTesting()) + if (UnitWSD::isUnitTesting() && !SigUtil::getShutdownRequestFlag()) { UnitWSD::get().checkTimeout(timeSinceStartMs); } |