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
8842e0f0
Commit
8842e0f0
authored
Aug 07, 2017
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: occasional test failures due to messages not (yet) received in test assertion
Solution: add sleep
parent
02e93492
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
test_hwm.cpp
tests/test_hwm.cpp
+4
-1
test_hwm_pubsub.cpp
tests/test_hwm_pubsub.cpp
+3
-2
No files found.
tests/test_hwm.cpp
View file @
8842e0f0
...
...
@@ -53,9 +53,12 @@ int test_defaults ()
// Send until we block
int
send_count
=
0
;
while
(
send_count
<
MAX_SENDS
&&
zmq_send
(
connect_socket
,
NULL
,
0
,
ZMQ_DONTWAIT
)
==
0
)
while
(
send_count
<
MAX_SENDS
&&
zmq_send
(
connect_socket
,
NULL
,
0
,
ZMQ_DONTWAIT
)
==
0
)
++
send_count
;
msleep
(
SETTLE_TIME
);
// Now receive all sent messages
int
recv_count
=
0
;
while
(
zmq_recv
(
bind_socket
,
NULL
,
0
,
ZMQ_DONTWAIT
)
==
0
)
...
...
tests/test_hwm_pubsub.cpp
View file @
8842e0f0
...
...
@@ -58,10 +58,11 @@ int test_defaults (int send_hwm, int msgCnt)
while
(
send_count
<
msgCnt
&&
zmq_send
(
pub_socket
,
NULL
,
0
,
ZMQ_DONTWAIT
)
==
0
)
++
send_count
;
msleep
(
SETTLE_TIME
);
// Now receive all sent messages
int
recv_count
=
0
;
while
(
0
==
zmq_recv
(
sub_socket
,
NULL
,
0
,
ZMQ_DONTWAIT
))
{
while
(
0
==
zmq_recv
(
sub_socket
,
NULL
,
0
,
ZMQ_DONTWAIT
))
{
++
recv_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