File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,14 +74,15 @@ def run_test(self):
7474 self .nodes [1 ].setban ("2001:4d48:ac57:400:cacf:e9ff:fe1d:9c63/19" , "add" , 1000 ) # ban for 1000 seconds
7575 listBeforeShutdown = self .nodes [1 ].listbanned ()
7676 assert_equal ("192.168.0.1/32" , listBeforeShutdown [2 ]['address' ])
77- self .bump_mocktime (2 )
77+ # Move time forward by 3 seconds so the third ban has expired
78+ self .bump_mocktime (3 )
7879 self .wait_until (lambda : len (self .nodes [1 ].listbanned ()) == 3 , timeout = 10 )
7980
8081 self .log .info ("Test ban_duration and time_remaining" )
8182 for ban in self .nodes [1 ].listbanned ():
8283 if ban ["address" ] in ["127.0.0.0/32" , "127.0.0.0/24" ]:
8384 assert_equal (ban ["ban_duration" ], 86400 )
84- assert_equal (ban ["time_remaining" ], 86398 )
85+ assert_equal (ban ["time_remaining" ], 86397 )
8586 elif ban ["address" ] == "2001:4d48:ac57:400:cacf:e9ff:fe1d:9c63/19" :
8687 assert_equal (ban ["ban_duration" ], 1000 )
8788 assert_equal (ban ["time_remaining" ], 997 )
You can’t perform that action at this time.
0 commit comments