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

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

commit b97777301fdff63ab4adf39b90094ea678ebc5b3
Author: Martin Zink <[email protected]>
AuthorDate: Fri Feb 5 13:14:12 2021 +0100

    MINIFICPP-1434: Fix flaky CSite2SiteTests on macOS
    
    Signed-off-by: Arpad Boda <[email protected]>
    
    This closes #994
---
 nanofi/tests/CSite2SiteTests.cpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/nanofi/tests/CSite2SiteTests.cpp b/nanofi/tests/CSite2SiteTests.cpp
index 761e124..120787d 100644
--- a/nanofi/tests/CSite2SiteTests.cpp
+++ b/nanofi/tests/CSite2SiteTests.cpp
@@ -17,6 +17,9 @@
  */
 
 #include <stdlib.h>
+#ifndef WIN32
+#include <signal.h>
+#endif
 
 #include <algorithm>
 #include <chrono>
@@ -68,6 +71,9 @@ void wait_until(std::atomic<bool>& b) {
 }
 
 TEST_CASE("TestSetPortId", "[S2S1]") {
+#ifndef WIN32
+  signal(SIGPIPE, SIG_IGN);
+#endif
   SiteToSiteCPeer peer;
   initPeer(&peer, "fake_host", 65433);
   CRawSiteToSiteClient * protocol = 
(CRawSiteToSiteClient*)malloc(sizeof(CRawSiteToSiteClient));
@@ -167,7 +173,9 @@ void different_version_bootstrap(minifi::io::BaseStream* 
stream, TransferState&
 }
 
 TEST_CASE("TestSiteToBootStrap", "[S2S3]") {
-
+#ifndef WIN32
+  signal(SIGPIPE, SIG_IGN);
+#endif
   std::array<std::function<void(minifi::io::BaseStream*, TransferState&, 
S2SReceivedData&)>, 2> bootstrap_functions =
       {sunny_path_bootstrap, different_version_bootstrap};
 

Reply via email to