Issue in p2p_timeouts: no_send_node.wait_for_disconnect(timeout=1) #23739

issue jonatack opened this issue on December 11, 2021
  1. jonatack commented at 12:22 AM on December 11, 2021: member

    CI https://cirrus-ci.com/task/5687505285545984

    Locally

    $ test/functional/p2p_timeouts.py 
    2021-12-10T23:40:36.399000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_hpui5kz3
    2021-12-10T23:40:38.232000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
            def test_function():
                if check_connected:
                    assert self.is_connected
                return test_function_in()
    '''
    2021-12-10T23:40:38.232000Z TestFramework (ERROR): Assertion failed
    Traceback (most recent call last):
      File "/home/jon/projects/bitcoin/bitcoin/test/functional/test_framework/test_framework.py", line 132, in main
        self.run_test()
      File "/home/jon/projects/bitcoin/bitcoin/test/functional/p2p_timeouts.py", line 92, in run_test
        no_send_node.wait_for_disconnect(timeout=1)
      File "/home/jon/projects/bitcoin/bitcoin/test/functional/test_framework/p2p.py", line 461, in wait_for_disconnect
        self.wait_until(test_function, timeout=timeout, check_connected=False)
      File "/home/jon/projects/bitcoin/bitcoin/test/functional/test_framework/p2p.py", line 453, in wait_until
        wait_until_helper(test_function, timeout=timeout, lock=p2p_lock, timeout_factor=self.timeout_factor)
      File "/home/jon/projects/bitcoin/bitcoin/test/functional/test_framework/util.py", line 269, in wait_until_helper
        raise AssertionError("Predicate {} not true after {} seconds".format(predicate_source, timeout))
    AssertionError: Predicate ''''
            def test_function():
                if check_connected:
                    assert self.is_connected
                return test_function_in()
    ''' not true after 1.0 seconds
    

    Appears to be related to the merge of #19499. Relevant diff:

    --- a/test/functional/p2p_timeouts.py
    +++ b/test/functional/p2p_timeouts.py
             with self.nodes[0].assert_debug_log(expected_msgs=expected_timeout_logs):
    -            sleep(3)
    -            # By now, we waited a total of 5 seconds. Off-by-two for two
    -            # reasons:
    -            #  * The internal precision is one second
    -            #  * Account for network delay
    -            assert not no_verack_node.is_connected
    -            assert not no_version_node.is_connectedZ
    -            assert not no_send_node.is_connected
    +            self.mock_forward(2)
    +            no_verack_node.wait_for_disconnect(timeout=1)
    +            no_version_node.wait_for_disconnect(timeout=1)
    +            no_send_node.wait_for_disconnect(timeout=1)
    
  2. jonatack added the label Bug on Dec 11, 2021
  3. MarcoFalke closed this on Dec 11, 2021

  4. sidhujag referenced this in commit ac6ebfd580 on Dec 11, 2021
  5. DrahtBot locked this on Dec 11, 2022

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-04-14 21:13 UTC

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