Commit 16d567a
Fix flaky async_payment test due to non-deterministic event ordering
node_sender_lsp and node_receiver_lsp each have two channels, so they
receive two ChannelReady events whose order depends on timing. The test
previously consumed these events in a fixed order, which could fail when
the events arrive in the opposite order.
Reproduced locally by swapping the assertion order at line 1346-1347,
which fails deterministically since the "normal" local ordering is the
opposite of the one expected by the swapped assertions.
Add an expect_channel_ready_events\! macro that consumes two ChannelReady
events and asserts both expected counterparties are present regardless of
arrival order.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 2f5a966 commit 16d567a
2 files changed
+45
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
101 | 129 | | |
102 | 130 | | |
103 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
1343 | 1344 | | |
1344 | 1345 | | |
1345 | 1346 | | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
1350 | 1357 | | |
1351 | 1358 | | |
1352 | 1359 | | |
| |||
0 commit comments