From 4fec4c99be9500525341836c9a85a218a2c0ce32 Mon Sep 17 00:00:00 2001 From: Simon Giesecke Date: Fri, 4 Aug 2017 11:35:00 +0200 Subject: [PATCH] Problem: sporadic failure in test_curve_security_with_null_client_credentials Solution: add workaround for EPIPE error --- tests/test_security_curve.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_security_curve.cpp b/tests/test_security_curve.cpp index 0f8fd248..7c484215 100644 --- a/tests/test_security_curve.cpp +++ b/tests/test_security_curve.cpp @@ -417,9 +417,11 @@ void test_curve_security_with_null_client_credentials (void *ctx, close_zero_linger (client); #ifdef ZMQ_BUILD_DRAFT_API - int event = get_monitor_event (server_mon, NULL, NULL, 0); + int err; + int event = get_monitor_event (server_mon, &err, NULL, 0); - assert (event == ZMQ_EVENT_HANDSHAKE_FAILED_ZMTP); + assert (event == ZMQ_EVENT_HANDSHAKE_FAILED_ZMTP + || (event == ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL && err == EPIPE)); #endif } @@ -436,6 +438,8 @@ void test_curve_security_with_plain_client_credentials (void *ctx, void *server) assert (rc == 0); expect_bounce_fail (server, client); close_zero_linger (client); + + // TODO add assertion here as in test_curve_security_with_null_client_credentials } void test_curve_security_unauthenticated_message (char *my_endpoint,