CI https://cirrus-ci.com/task/5687505285545984
Locally
0$ test/functional/p2p_timeouts.py
12021-12-10T23:40:36.399000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_hpui5kz3
22021-12-10T23:40:38.232000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
3 def test_function():
4 if check_connected:
5 assert self.is_connected
6 return test_function_in()
7'''
82021-12-10T23:40:38.232000Z TestFramework (ERROR): Assertion failed
9Traceback (most recent call last):
10 File "/home/jon/projects/bitcoin/bitcoin/test/functional/test_framework/test_framework.py", line 132, in main
11 self.run_test()
12 File "/home/jon/projects/bitcoin/bitcoin/test/functional/p2p_timeouts.py", line 92, in run_test
13 no_send_node.wait_for_disconnect(timeout=1)
14 File "/home/jon/projects/bitcoin/bitcoin/test/functional/test_framework/p2p.py", line 461, in wait_for_disconnect
15 self.wait_until(test_function, timeout=timeout, check_connected=False)
16 File "/home/jon/projects/bitcoin/bitcoin/test/functional/test_framework/p2p.py", line 453, in wait_until
17 wait_until_helper(test_function, timeout=timeout, lock=p2p_lock, timeout_factor=self.timeout_factor)
18 File "/home/jon/projects/bitcoin/bitcoin/test/functional/test_framework/util.py", line 269, in wait_until_helper
19 raise AssertionError("Predicate {} not true after {} seconds".format(predicate_source, timeout))
20AssertionError: Predicate ''''
21 def test_function():
22 if check_connected:
23 assert self.is_connected
24 return test_function_in()
25''' not true after 1.0 seconds
Appears to be related to the merge of #19499. Relevant diff:
0--- a/test/functional/p2p_timeouts.py
1+++ b/test/functional/p2p_timeouts.py
2 with self.nodes[0].assert_debug_log(expected_msgs=expected_timeout_logs):
3- sleep(3)
4- # By now, we waited a total of 5 seconds. Off-by-two for two
5- # reasons:
6- # * The internal precision is one second
7- # * Account for network delay
8- assert not no_verack_node.is_connected
9- assert not no_version_node.is_connectedZ
10- assert not no_send_node.is_connected
11+ self.mock_forward(2)
12+ no_verack_node.wait_for_disconnect(timeout=1)
13+ no_version_node.wait_for_disconnect(timeout=1)
14+ no_send_node.wait_for_disconnect(timeout=1)