Skip to content

Commit 248677d

Browse files
committed
pytest: fix flake in test_last_stable_connection.
``` > assert only_one(l1.rpc.listpeerchannels()['channels'])['last_stable_connection'] > recon_time + STABLE_TIME E assert 1742167762 > (1742167702.0235627 + 60) tests/test_connection.py:4545: AssertionError ``` Indeed, the > should be >=. Signed-off-by: Rusty Russell <[email protected]>
1 parent 8cbb245 commit 248677d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_connection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4533,7 +4533,7 @@ def test_last_stable_connection(node_factory):
45334533

45344534
# Disconnect, and/or restart then reconnect.
45354535
l1.rpc.disconnect(l2.info['id'], force=True)
4536-
recon_time = time.time()
4536+
recon_time = int(time.time())
45374537
l2.restart()
45384538
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
45394539

@@ -4542,8 +4542,8 @@ def test_last_stable_connection(node_factory):
45424542
wait_for(lambda: only_one(l1.rpc.listpeerchannels()['channels'])['last_stable_connection'] != l1stable, timeout=STABLE_TIME + 15)
45434543
wait_for(lambda: only_one(l2.rpc.listpeerchannels()['channels'])['last_stable_connection'] != l2stable)
45444544

4545-
assert only_one(l1.rpc.listpeerchannels()['channels'])['last_stable_connection'] > recon_time + STABLE_TIME
4546-
assert only_one(l2.rpc.listpeerchannels()['channels'])['last_stable_connection'] > recon_time + STABLE_TIME
4545+
assert only_one(l1.rpc.listpeerchannels()['channels'])['last_stable_connection'] >= recon_time + STABLE_TIME
4546+
assert only_one(l2.rpc.listpeerchannels()['channels'])['last_stable_connection'] >= recon_time + STABLE_TIME
45474547

45484548

45494549
def test_wss_proxy(node_factory):

0 commit comments

Comments
 (0)