From 65ff339d9dd71902d955138b3d76257eec83020d Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Thu, 12 Nov 2026 10:48:30 -0600 Subject: [PATCH] Fix flaky never-recorded-facts close test a_close_is_classified_for_a_channel_whose_facts_were_never_recorded restarts node_a, reconnects the peers, and immediately calls close_channel. If channel reestablish has not completed yet, LDK rejects the close and the test panics with ChannelClosingFailed, as seen on the macOS CI leg. Wait for the channel to report is_usable after reconnecting before closing. AI tooling (Claude Code) was used to diagnose and fix this test. Co-Authored-By: Claude Fable 5 --- tests/integration_tests_rust.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration_tests_rust.rs b/tests/integration_tests_rust.rs index 8ce5bdb236..c252d4ab75 100644 --- a/tests/integration_tests_rust.rs +++ b/tests/integration_tests_rust.rs @@ -924,6 +924,8 @@ async fn a_close_is_classified_for_a_channel_whose_facts_were_never_recorded() { let node_addr_b = node_b.listening_addresses().unwrap().first().unwrap().clone(); node_a.connect(node_b.node_id(), node_addr_b, false).unwrap(); + // Closing before channel reestablish completes fails with `ChannelClosingFailed`. + wait_for_channel_ready_to_send(&node_a, &node_b, 0).await; let user_channel_id_a = node_a.list_channels().first().unwrap().user_channel_id; node_a.close_channel(&user_channel_id_a, node_b.node_id()).unwrap(); expect_event!(node_a, ChannelClosed);