Skip to content

Commit 4444de1

Browse files
author
MarcoFalke
committed
test: Set mocktime in p2p_disconnect_ban.py to avoid intermittent test failure
1 parent fa6aa40 commit 4444de1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/functional/p2p_disconnect_ban.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ def run_test(self):
102102
assert_equal(ban["ban_duration"], 120)
103103
assert_equal(ban["time_remaining"], 117)
104104

105-
self.restart_node(1)
105+
# Keep mocktime, to avoid ban expiry when restart takes longer than
106+
# time_remaining
107+
self.restart_node(1, extra_args=[f"-mocktime={old_time+4}"])
106108

107109
listAfterShutdown = self.nodes[1].listbanned()
108110
assert_equal("127.0.0.0/24", listAfterShutdown[0]['address'])

0 commit comments

Comments
 (0)