mirror of
https://github.com/zeromq/libzmq.git
synced 2025-07-04 09:37:15 +02: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++;
|
send_count++;
|
||||||
TEST_ASSERT_EQUAL_INT (EAGAIN, errno);
|
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++;
|
recv_count++;
|
||||||
|
|
||||||
|
while (zmq_recv (sub, NULL, 0, ZMQ_DONTWAIT) == 0)
|
||||||
|
recv_count++;
|
||||||
|
}
|
||||||
|
|
||||||
TEST_ASSERT_EQUAL_INT (send_count, recv_count);
|
TEST_ASSERT_EQUAL_INT (send_count, recv_count);
|
||||||
|
|
||||||
// Clean up.
|
// Clean up.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user