You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2022/05/05 12:11:57 UTC

[nifi-minifi-cpp] 02/03: MINIFICPP-1813 Stabilize AbsoluteTimeoutTest in CI on Windows

This is an automated email from the ASF dual-hosted git repository.

martinzink pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 160378b81409df77f64cd46e55e107345081d07e
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Thu May 5 13:46:08 2022 +0200

    MINIFICPP-1813 Stabilize AbsoluteTimeoutTest in CI on Windows
    
    Closes #1320
    
    Signed-off-by: Martin Zink <ma...@apache.org>
---
 .github/workflows/ci.yml                           |  2 +-
 extensions/http-curl/tests/AbsoluteTimeoutTest.cpp | 12 +++---------
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index cf1dfa7d2..6b72d95fe 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -84,7 +84,7 @@ jobs:
           win_build_vs.bat ..\b /64 /CI /S /A /PDH /SPLUNK /GCP /K /L /R /Z /N /RO
         shell: cmd
       - name: test
-        run: cd ..\b && ctest --timeout 300 --parallel 8 -C Release --output-on-failure
+        run: cd ..\b && ctest --timeout 300 --parallel %NUMBER_OF_PROCESSORS% -C Release --output-on-failure
         shell: cmd
       - name: linter
         run: cd ..\b && msbuild -maxCpuCount linter.vcxproj
diff --git a/extensions/http-curl/tests/AbsoluteTimeoutTest.cpp b/extensions/http-curl/tests/AbsoluteTimeoutTest.cpp
index e7f52a61a..9f2c4939a 100644
--- a/extensions/http-curl/tests/AbsoluteTimeoutTest.cpp
+++ b/extensions/http-curl/tests/AbsoluteTimeoutTest.cpp
@@ -22,20 +22,14 @@
 #include "tests/TestServer.h"
 #include "HTTPHandlers.h"
 
+using namespace std::literals::chrono_literals;
+
 int main() {
   TestController controller;
 
   std::string port = "12324";
   std::string rootURI =  "/";
-  TimeoutingHTTPHandler handler({
-    std::chrono::milliseconds(500),
-    std::chrono::milliseconds(500),
-    std::chrono::milliseconds(500),
-    std::chrono::milliseconds(500),
-    std::chrono::milliseconds(500),
-    std::chrono::milliseconds(500),
-    std::chrono::milliseconds(500)
-  });
+  TimeoutingHTTPHandler handler(std::vector<std::chrono::milliseconds>(35, 100ms));
 
   TestServer server(port, rootURI, &handler);