Commit d4401b23 authored by Simon Giesecke's avatar Simon Giesecke

Problem: test case not making use of test_bind helper function

Solution: replace custom code by test_bind
parent bd6fa4bb
......@@ -46,14 +46,11 @@ void tearDown ()
int test_defaults (int send_hwm_, int msg_cnt_, const char *endpoint)
{
size_t len = SOCKET_STRING_LEN;
char pub_endpoint[SOCKET_STRING_LEN];
// Set up and bind XPUB socket
void *pub_socket = test_context_socket (ZMQ_XPUB);
TEST_ASSERT_SUCCESS_ERRNO (zmq_bind (pub_socket, endpoint));
TEST_ASSERT_SUCCESS_ERRNO (
zmq_getsockopt (pub_socket, ZMQ_LAST_ENDPOINT, pub_endpoint, &len));
test_bind (pub_socket, endpoint, pub_endpoint, sizeof pub_endpoint);
// Set up and connect SUB socket
void *sub_socket = test_context_socket (ZMQ_SUB);
......@@ -117,14 +114,11 @@ int receive (void *socket_, int *is_termination)
int test_blocking (int send_hwm_, int msg_cnt_, const char *endpoint)
{
size_t len = SOCKET_STRING_LEN;
char pub_endpoint[SOCKET_STRING_LEN];
// Set up bind socket
void *pub_socket = test_context_socket (ZMQ_XPUB);
TEST_ASSERT_SUCCESS_ERRNO (zmq_bind (pub_socket, endpoint));
TEST_ASSERT_SUCCESS_ERRNO (
zmq_getsockopt (pub_socket, ZMQ_LAST_ENDPOINT, pub_endpoint, &len));
test_bind (pub_socket, endpoint, pub_endpoint, sizeof pub_endpoint);
// Set up connect socket
void *sub_socket = test_context_socket (ZMQ_SUB);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment