From eeccbbd6f89df3248ad5f88116d4098d7c43104c Mon Sep 17 00:00:00 2001 From: sigiesec Date: Fri, 1 Sep 2017 15:51:57 +0200 Subject: [PATCH] Problem: test case fails with tcp transport Solution: use inproc transport instead --- tests/test_router_mandatory.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/test_router_mandatory.cpp b/tests/test_router_mandatory.cpp index e467eab1..2062e513 100644 --- a/tests/test_router_mandatory.cpp +++ b/tests/test_router_mandatory.cpp @@ -62,13 +62,8 @@ void test_get_peer_state () rc = zmq_setsockopt (router, ZMQ_ROUTER_MANDATORY, &mandatory, sizeof (mandatory)); - rc = zmq_bind (router, "tcp://127.0.0.1:*"); - assert (rc == 0); - - size_t my_endpoint_len = MAX_SOCKET_STRING; - char my_endpoint[MAX_SOCKET_STRING]; - rc = - zmq_getsockopt (router, ZMQ_LAST_ENDPOINT, my_endpoint, &my_endpoint_len); + const char *my_endpoint = "inproc://test_get_peer_state"; + rc = zmq_bind (router, my_endpoint); assert (rc == 0); void *dealer1 = zmq_socket (ctx, ZMQ_DEALER);