diff options
author | fanquake <fanquake@gmail.com> | 2021-01-21 16:29:14 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-01-21 16:38:06 +0800 |
commit | 3734adba390cef881445c4de780e2a3bb080c512 (patch) | |
tree | 44a69b76f67c1e8718fb260887f72d8f25100774 /src/test/fuzz/policy_estimator_io.cpp | |
parent | 80486e7e2d8c360839cffc5a0c597b5c745433a7 (diff) | |
parent | 4efb6c2d3b41c6badb4d8d5d9370387a91bf7066 (diff) |
Merge #20953: test: dedup zmq test setup code (node restart, topics subscription)
4efb6c2d3b41c6badb4d8d5d9370387a91bf7066 zmq test: deduplicate test setup code (node restart, topics subscription) (Sebastian Falbesoner)
Pull request description:
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).
ACKs for top commit:
instagibbs:
ACK 4efb6c2d3b41c6badb4d8d5d9370387a91bf7066
laanwj:
Code review ACK https://github.com/bitcoin/bitcoin/pull/20953/commits/4efb6c2d3b41c6badb4d8d5d9370387a91bf7066
Tree-SHA512: d49626756a9c669f1133f1b73ce273994b58c760ce0d6a4bdaa384f043a74149dc2b9fa66fe990413d9105f9c3b6ea973e099669e8e02f2902a5b84fa995028c
Diffstat (limited to 'src/test/fuzz/policy_estimator_io.cpp')
0 files changed, 0 insertions, 0 deletions