mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 10:52:56 +01:00
problem: test_xpub_nodrop fails frequently
Solution: fix the test
This commit is contained in:
parent
539718f35a
commit
2d6a66a81d
@ -101,8 +101,15 @@ void test ()
|
||||
send_count++;
|
||||
TEST_ASSERT_EQUAL_INT (EAGAIN, errno);
|
||||
|
||||
while (zmq_recv (sub, NULL, 0, ZMQ_DONTWAIT) == 0)
|
||||
if (send_count > 0) {
|
||||
// Receive first message with blocking
|
||||
TEST_ASSERT_SUCCESS_ERRNO (zmq_recv (sub, NULL, 0, 0));
|
||||
recv_count++;
|
||||
|
||||
while (zmq_recv (sub, NULL, 0, ZMQ_DONTWAIT) == 0)
|
||||
recv_count++;
|
||||
}
|
||||
|
||||
TEST_ASSERT_EQUAL_INT (send_count, recv_count);
|
||||
|
||||
// Clean up.
|
||||
|
Loading…
Reference in New Issue
Block a user