mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 10:33:52 +01:00
Merge pull request #3897 from bluca/fuzzers
Problem: test_hello_msg binds to hard-coded port and fails when it's in use
This commit is contained in:
commit
c2ffe2e6d2
@ -36,16 +36,17 @@ void test (const char *address)
|
||||
{
|
||||
// Create a router
|
||||
void *router = test_context_socket (ZMQ_ROUTER);
|
||||
char my_endpoint[MAX_SOCKET_STRING];
|
||||
|
||||
// set router socket options
|
||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_setsockopt (router, ZMQ_HELLO_MSG, "H", 1));
|
||||
|
||||
// bind router
|
||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_bind (router, address));
|
||||
test_bind (router, address, my_endpoint, MAX_SOCKET_STRING);
|
||||
|
||||
// Create a dealer
|
||||
void *dealer = test_context_socket (ZMQ_DEALER);
|
||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (dealer, address));
|
||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (dealer, my_endpoint));
|
||||
|
||||
// Receive the hello message
|
||||
recv_string_expect_success (dealer, "H", 0);
|
||||
@ -57,7 +58,7 @@ void test (const char *address)
|
||||
|
||||
void test_tcp ()
|
||||
{
|
||||
test ("tcp://127.0.0.1:5569");
|
||||
test ("tcp://127.0.0.1:*");
|
||||
}
|
||||
|
||||
void test_inproc ()
|
||||
|
Loading…
Reference in New Issue
Block a user