Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
d4401b23
Commit
d4401b23
authored
Apr 02, 2019
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: test case not making use of test_bind helper function
Solution: replace custom code by test_bind
parent
bd6fa4bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
test_hwm_pubsub.cpp
tests/test_hwm_pubsub.cpp
+2
-8
No files found.
tests/test_hwm_pubsub.cpp
View file @
d4401b23
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment