Skip to content

Commit fabcd64

Browse files
author
MarcoFalke
committed
test: Avoid racy test p2p_timeouts
1 parent 45fe390 commit fabcd64

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/functional/p2p_timeouts.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ def run_test(self):
7272
]
7373

7474
with self.nodes[0].assert_debug_log(expected_msgs=expected_timeout_logs):
75-
sleep(2)
75+
sleep(3)
76+
# By now, we waited a total of 5 seconds. Off-by-two for two
77+
# reasons:
78+
# * The internal precision is one second
79+
# * Account for network delay
7680
assert not no_verack_node.is_connected
7781
assert not no_version_node.is_connected
7882
assert not no_send_node.is_connected

0 commit comments

Comments
 (0)