zeromq / zmqpp

0mq 'highlevel' C++ bindings
http://zeromq.github.io/zmqpp
Mozilla Public License 2.0
438 stars 197 forks source link

Probably error in test sanity - zmq_basic_push_pull #116

Closed malexzx closed 9 years ago

malexzx commented 9 years ago

Hello.

Found that in file test_sanity.cpp, instead of zmq_pollitem_t items[] = { { puller, ZMQ_POLLIN, 0, 0 } }; BOOST_CHECK_EQUAL(0, zmq_poll(items, 1, max_poll_timeout)); sould be: zmq_pollitem_t items[] = { { puller, 0, ZMQ_POLLIN, 0 } }; BOOST_CHECK(zmq_poll(items, 1, max_poll_timeout) >= 0);

Thank you, Alexander

xaqq commented 9 years ago

Thanks for spotting this. In my patch, I check the result of zmq_poll() against 1. I increased the timeout to 1sec, so we have plenty of time to make sure the message is received by the pulling socket.