fix intermittent failure in interface_zmq.py #34574

pull Hijanhv wants to merge 1 commits into bitcoin:master from Hijanhv:fix-interface-zmq-test changing 1 files +10 −1
  1. Hijanhv commented at 2:52 pm on February 12, 2026: none

    The interface_zmq.py test has been flaky due to a race condition - sometimes ZMQ messages aren’t available immediately when we try to read them.

    This adds a simple retry mechanism: if the message isn’t ready, we’ll retry up to 5 times with a 0.1s delay between attempts. Instead of crashing on zmq.error.Again exceptions, the test now handles them gracefully.

    Fixes #34189

  2. DrahtBot added the label Tests on Feb 12, 2026
  3. DrahtBot commented at 2:52 pm on February 12, 2026: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  4. Hijanhv force-pushed on Feb 12, 2026
  5. Hijanhv commented at 2:57 pm on February 12, 2026: none
  6. test: fix intermittent failure in interface_zmq.py
    The test_zmq.py functional test occasionally failed due to ZMQ messages
    not being immediately available when checked. Added retry mechanism with
    exponential backoff (5 attempts, 0.1s delay) to handle transient ZMQ
    message delivery timing issues.
    
    Fixes #34189
    8e57b4e519
  7. in test/functional/interface_zmq.py:59 in 6ef00c23bd
    54@@ -54,7 +55,17 @@ def __init__(self, socket, topic):
    55 
    56     # Receive message from publisher and verify that topic and sequence match
    57     def _receive_from_publisher_and_check(self):
    58-        topic, body, seq = self.socket.recv_multipart()
    59+        max_retries = 5
    60+        retry_delay = 0.1
    


    pinheadmz commented at 3:10 pm on February 12, 2026:
    Did you check the test framework for “retry” utilities that are already used in similar tests?

    Hijanhv commented at 3:21 pm on February 12, 2026:
    now i get you .
  8. Hijanhv force-pushed on Feb 12, 2026
  9. Hijanhv requested review from pinheadmz on Feb 12, 2026
  10. Hijanhv renamed this:
    test: fix intermittent failure in interface_zmq.py
    fix intermittent failure in interface_zmq.py
    on Feb 12, 2026
  11. DrahtBot renamed this:
    fix intermittent failure in interface_zmq.py
    fix intermittent failure in interface_zmq.py
    on Feb 12, 2026
  12. sedited commented at 11:26 am on February 13, 2026: contributor
    Your change is failing a bunch of CI jobs. There is also no need to ping other developers for review while CI is failing. This is not a pressing change, people will review the PR when they get around to it.
  13. DrahtBot added the label CI failed on Feb 13, 2026
  14. Hijanhv closed this on Feb 15, 2026


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-02-17 06:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me