itest: fix flake in testSwitchOfflineDelivery

The reconnection will happen automatically when the nodes have a
channel, so we just ensure the connection instead of reconnecting
directly.
This commit is contained in:
yyforyongyu 2024-11-03 08:21:24 +08:00
parent 66b35018b8
commit 8b8f0c4eb4
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868

View File

@ -103,7 +103,7 @@ func testSwitchOfflineDelivery(ht *lntest.HarnessTest) {
ht.DisconnectNodes(s.dave, s.alice)
// Then, reconnect them to ensure Dave doesn't just fail back the htlc.
ht.ConnectNodes(s.dave, s.alice)
ht.EnsureConnected(s.dave, s.alice)
// Wait to ensure that the payment remain are not failed back after
// reconnecting. All node should report the number payments initiated