mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-01 10:57:59 +01:00
Problem: test case not making use of test_bind helper function
Solution: replace custom code by test_bind
This commit is contained in:
parent
bd6fa4bbb3
commit
d4401b230b
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user