zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.71k stars 2.35k forks source link

avoid intermittent timeouts in test (esp. when run w/ASAN etc.) #4430

Closed bill-torpey closed 2 years ago

bill-torpey commented 2 years ago

We're trying to automate running the unit tests, but an intermittent timeout error in test_spec_req is causing problems. This is particularly troublesome when running the tests under sanitizers (e.g., ASAN).

        Start  32: test_spec_req
 32/117 Test  #32: test_spec_req ....................***Timeout  10.01 sec

Running the test stand-alone is not much more informative:

[btorpey@bt-brix7 master]$ ./build/bin/test_spec_req
/home/btorpey/work/libzmq/master/src/tests/test_spec_req.cpp:230:test_round_robin_out_inproc:PASS

Alarm clock
[btorpey@bt-brix7 master]$

OTOH, the test succeeds when run under gdb.

In any case, the patch below appears to eliminate the timeout by multiplying SETTLE_TIME by the number of peers.