This PR deduplicates common setup code for the ZMQ functional test. The following steps, previously duplicated in each sub-test, are put into a new method setup_zmq_test(...):
- create subscriber sockets (zmq.SUB) for each topic with the specified timeout (default 60s)
- restart node0 with specified zmq notifications enabled (-zmqpub...=tcp://127.0.0.1:...…)
- if desired, connect node0 with node1 (note done by default)
- connect all susbcriber sockets to publisher (running on node0)
- wait a bit (currently 200ms), to “Relax so that the subscribers are ready before publishing zmq messages”
Note that the last point should be repaced by a more robust method, as this test is still flaky, see #20934 (also #20590 and #20538).