[zeromq-dev] need help writing a test for zmq_poll

Martin Sustrik sustrik at 250bpm.com
Tue Nov 15 09:12:05 CET 2011


On 11/15/2011 09:09 AM, Martin Sustrik wrote:

> I would say, write a single function that takes two sockets, sends a
> message to one, polls on the other with long timeout (24 hrs or such)
> and recvs a message from it. In other words if the behaviour you
> describe happens, the test will hang up for 24 hrs.

Other options is to make the timout smaller (1 sec or so) and use the 
stopwatch from zmq_utils.h to check how long did the actual polling 
took. If it were longer than say couple of milliseconds, then make the 
test fail.

Martin



More information about the zeromq-dev mailing list