diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30937329ae..4c85befe1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,7 +74,7 @@ jobs: - run: ./configure --everything --no-samples --omit=CppParser,Encodings,Data/MySQL,Data/ODBC,Data/PostgreSQL,MongoDB,PageCompiler,PDF,PocoDoc,ProGen,Redis,SevenZip && make all -s -j4 SANITIZEFLAGS=-fsanitize=thread && sudo make install - uses: nick-fields/retry@v2.9.0 with: - timeout_minutes: 90 + timeout_minutes: 20 max_attempts: 3 retry_on: any command: >- diff --git a/Foundation/testsuite/src/TaskTest.cpp b/Foundation/testsuite/src/TaskTest.cpp index 2d2bd5eaa5..551f0bb122 100644 --- a/Foundation/testsuite/src/TaskTest.cpp +++ b/Foundation/testsuite/src/TaskTest.cpp @@ -15,6 +15,7 @@ #include "Poco/Thread.h" #include "Poco/Event.h" #include "Poco/AutoPtr.h" +#include using Poco::Task; @@ -34,20 +35,42 @@ namespace void runTask() { - _event.wait(); - if (sleep(10)) - return; - setProgress(0.5); - _event.wait(); - if (isCancelled()) - return; - setProgress(1.0); - _event.wait(); + try + { + _event.wait(); + if (sleep(10)) + return; + setProgress(0.5); + _event.wait(); + if (isCancelled()) + return; + setProgress(1.0); + _event.wait(); + } + catch(const Poco::Exception& e) + { + std::cerr << "TestTask::run(): " << e.displayText() << '\n'; + } + catch(const std::exception& e) + { + std::cerr << "TestTask::run(): " << e.what() << '\n'; + } + catch(...) + { + std::cerr << "TestTask::run(): unknown exception." << '\n'; + } } void cont() { - _event.set(); + try + { + _event.set(); + } + catch(const Poco::SystemException& e) + { + std::cerr << "TestTask::cont(): " << e.displayText() << '\n'; + } } private: