mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 10:52:56 +01:00
Problem: bind_loopback_ipv4 not reusable
Solution: Moved bind_loopback_ipv4 to testutil_unity to allow for reuse
This commit is contained in:
parent
8d0d4c76ee
commit
cdc298f567
@ -446,13 +446,6 @@ TEST_CASE_FUNC_PARAM (call_poller_wait_all_empty_without_timeout_fails,
|
|||||||
TEST_CASE_FUNC_PARAM (call_poller_wait_all_empty_with_timeout_fails,
|
TEST_CASE_FUNC_PARAM (call_poller_wait_all_empty_with_timeout_fails,
|
||||||
test_with_empty_poller)
|
test_with_empty_poller)
|
||||||
|
|
||||||
void bind_loopback_ipv4 (void *socket, char *my_endpoint, size_t len)
|
|
||||||
{
|
|
||||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_bind (socket, "tcp://127.0.0.1:*"));
|
|
||||||
TEST_ASSERT_SUCCESS_ERRNO (
|
|
||||||
zmq_getsockopt (socket, ZMQ_LAST_ENDPOINT, my_endpoint, &len));
|
|
||||||
}
|
|
||||||
|
|
||||||
void test_poll_basic ()
|
void test_poll_basic ()
|
||||||
{
|
{
|
||||||
// Create few sockets
|
// Create few sockets
|
||||||
|
@ -191,3 +191,10 @@ void *test_context_socket_close (void *socket)
|
|||||||
internal_manage_test_sockets (socket, false);
|
internal_manage_test_sockets (socket, false);
|
||||||
return socket;
|
return socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void bind_loopback_ipv4 (void *socket, char *my_endpoint, size_t len)
|
||||||
|
{
|
||||||
|
TEST_ASSERT_SUCCESS_ERRNO (zmq_bind (socket, "tcp://127.0.0.1:*"));
|
||||||
|
TEST_ASSERT_SUCCESS_ERRNO (
|
||||||
|
zmq_getsockopt (socket, ZMQ_LAST_ENDPOINT, my_endpoint, &len));
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user