Skip to content

Commit 84a3767

Browse files
committed
Problem: open TODO comment regarding explicit zmq_disconnect/zmq_unbind
Solution: replaced by a comment explaining why the calls are in the test
1 parent 786a8d4 commit 84a3767

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

tests/test_reqrep_tcp.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ void test_single_connect (int ipv6)
5555

5656
bounce (sb, sc);
5757

58-
// TODO is explicit disconnect/unbind essential for the test? if not,
59-
// these calls should probably be left out, for clarity/readability
58+
// the sockets are disconnected and unbound explicitly in this test case
59+
// to check that this can be done successfully with the expected
60+
// endpoints/addresses
6061

6162
TEST_ASSERT_SUCCESS_ERRNO (zmq_disconnect (sc, my_endpoint));
6263

@@ -108,6 +109,8 @@ void test_multi_connect (int ipv6)
108109
bounce (sb2, sc);
109110
bounce (sb0, sc);
110111

112+
/// see comment on zmq_disconnect/zmq_unbind in test_single_connect
113+
111114
TEST_ASSERT_SUCCESS_ERRNO (zmq_disconnect (sc, my_endpoint_0));
112115
TEST_ASSERT_SUCCESS_ERRNO (zmq_disconnect (sc, my_endpoint_3));
113116
TEST_ASSERT_SUCCESS_ERRNO (zmq_disconnect (sc, my_endpoint_1));
@@ -161,6 +164,8 @@ void test_multi_connect_same_port (int ipv6)
161164
bounce (sb0, sc0);
162165
bounce (sb1, sc0);
163166

167+
/// see comment on zmq_disconnect/zmq_unbind in test_single_connect
168+
164169
TEST_ASSERT_SUCCESS_ERRNO (zmq_disconnect (sc1, my_endpoint_4));
165170
TEST_ASSERT_SUCCESS_ERRNO (zmq_disconnect (sc1, my_endpoint_5));
166171
TEST_ASSERT_SUCCESS_ERRNO (zmq_disconnect (sc0, my_endpoint_2));

0 commit comments

Comments
 (0)