From de82cbe4ba64578417de8835248a476c76417396 Mon Sep 17 00:00:00 2001 From: Simon Giesecke Date: Mon, 7 Aug 2017 10:59:36 +0200 Subject: [PATCH] Problem: failing assertion on ZAP protocol error Solution: do not assert on ZAP protocol error when connection was closed by client --- tests/test_security_curve.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_security_curve.cpp b/tests/test_security_curve.cpp index 88578785..495c5a56 100644 --- a/tests/test_security_curve.cpp +++ b/tests/test_security_curve.cpp @@ -564,12 +564,15 @@ void test_curve_security_zap_unsuccessful (void *ctx, ctx, valid_server_public, valid_client_public, valid_client_secret, my_endpoint, server); + int events_received = 0; #ifdef ZMQ_BUILD_DRAFT_API - expect_monitor_event_multiple (server_mon, expected_event, expected_err); + events_received = + expect_monitor_event_multiple (server_mon, expected_event, expected_err); #endif // there may be more than one ZAP request due to repeated attempts by the client - assert (1 <= zmq_atomic_counter_value (zap_requests_handled)); + assert (events_received == 0 + || 1 <= zmq_atomic_counter_value (zap_requests_handled)); } void test_curve_security_zap_protocol_error (void *ctx,