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
f083e60d
Commit
f083e60d
authored
Mar 22, 2019
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: use of extra context
Solution: use test context instead
parent
924d47f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
test_hwm.cpp
tests/test_hwm.cpp
+4
-11
No files found.
tests/test_hwm.cpp
View file @
f083e60d
...
...
@@ -191,12 +191,8 @@ int test_inproc_connect_and_close_first (int send_hwm_, int recv_hwm_)
int
test_inproc_bind_and_close_first
(
int
send_hwm_
,
int
/* recv_hwm */
)
{
void
*
ctx
=
zmq_ctx_new
();
TEST_ASSERT_NOT_NULL
(
ctx
);
// Set up bind socket
void
*
bind_socket
=
zmq_socket
(
ctx
,
ZMQ_PUSH
);
TEST_ASSERT_NOT_NULL
(
bind_socket
);
void
*
bind_socket
=
test_context_socket
(
ZMQ_PUSH
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_setsockopt
(
bind_socket
,
ZMQ_SNDHWM
,
&
send_hwm_
,
sizeof
(
send_hwm_
)));
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_bind
(
bind_socket
,
"inproc://a"
));
...
...
@@ -208,12 +204,11 @@ int test_inproc_bind_and_close_first (int send_hwm_, int /* recv_hwm */)
++
send_count
;
// Close bind
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_close
(
bind_socket
)
);
test_context_socket_close
(
bind_socket
);
/* TODO Can't currently do connect without then wiring up a bind as things hang, this needs top be fixed.
// Set up connect socket
void *connect_socket = zmq_socket (ctx, ZMQ_PULL);
TEST_ASSERT_NOT_NULL(connect_socket);
void *connect_socket = test_context_socket (ZMQ_PULL);
TEST_ASSERT_SUCCESS_ERRNO (zmq_setsockopt (connect_socket, ZMQ_RCVHWM, &recv_hwm, sizeof (recv_hwm)));
TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (connect_socket, "inproc://a"));
...
...
@@ -226,9 +221,7 @@ int test_inproc_bind_and_close_first (int send_hwm_, int /* recv_hwm */)
*/
// Clean up
//TEST_ASSERT_SUCCESS_ERRNO (zmq_close (connect_socket));
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_ctx_term
(
ctx
));
//test_context_socket_close (connect_socket);
return
send_count
;
}
...
...
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