test: Add missing timeout_factor to zmq socket #34690

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2602-test-zmq changing 1 files +1 −1
  1. maflcko commented at 1:02 pm on February 27, 2026: member

    Fixes #34189

    Otherwise, the test may intermittently fail on slow CI systems that have --timeout-factor= properly set.

    It can be tested by running ./bld-cmake/test/functional/interface_zmq.py --timeout-factor=10 with this diff:

     0diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp
     1index c7be6abc3a..b14cf2aee6 100644
     2--- a/src/validationinterface.cpp
     3+++ b/src/validationinterface.cpp
     4@@ -166,2 +166,3 @@ void ValidationSignals::SyncWithValidationInterfaceQueue()
     5             LOG_EVENT(fmt, local_name, __VA_ARGS__);           \
     6+            UninterruptibleSleep(45ms); \
     7             event();                                           \
     8diff --git a/test/functional/interface_zmq.py b/test/functional/interface_zmq.py
     9index 6717007626..eee377daea 100755
    10--- a/test/functional/interface_zmq.py
    11+++ b/test/functional/interface_zmq.py
    12@@ -176,3 +176,3 @@ class ZMQTest (BitcoinTestFramework):
    13         for sub in subscribers:
    14-            sub.socket.set(zmq.RCVTIMEO, recv_timeout*1000)
    15+            sub.socket.set(zmq.RCVTIMEO, int(recv_timeout * 1000))
    16 
    17@@ -271,3 +271,3 @@ class ZMQTest (BitcoinTestFramework):
    18             [(topic, address) for topic in ["hashblock", "hashtx"]],
    19-            recv_timeout=2)  # 2 second timeout to check end of notifications
    20+            recv_timeout=0.2)  # 2 second timeout to check end of notifications
    21         self.disconnect_nodes(0, 1)
    

    Before this pull: Test fails with zmq.error.Again: Resource temporarily unavailable

    After this pull: Test passes

  2. test: Add missing timeout_factor to zmq socket fa48f8c865
  3. DrahtBot added the label Tests on Feb 27, 2026
  4. DrahtBot commented at 1:02 pm on February 27, 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.

    Type Reviewers
    ACK l0rinc, achow101

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  5. maflcko added this to the milestone 31.0 on Feb 27, 2026
  6. l0rinc commented at 1:32 pm on February 27, 2026: contributor

    code review ACK fa48f8c8655d93e78b32b560a870577909b666d3

    Converting from seconds to millis (pre-existing behavior), scaling by timeout factor meant for heavier CI (not sure if sanitizers are the reason here or just slow machines), and casting the result back from float.

  7. achow101 commented at 11:14 pm on February 27, 2026: member
    ACK fa48f8c8655d93e78b32b560a870577909b666d3
  8. achow101 merged this on Feb 27, 2026
  9. achow101 closed this on Feb 27, 2026

  10. fanquake referenced this in commit 22cc95584e on Mar 2, 2026
  11. fanquake commented at 10:05 am on March 2, 2026: member
    Backported to 30.x in #34689.
  12. maflcko deleted the branch on Mar 2, 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-03-09 09:13 UTC

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