Skip to content

Fix listsendpay flake#9241

Open
Lagrang3 wants to merge 2 commits into
ElementsProject:masterfrom
Lagrang3:fix-listsendpay-flake
Open

Fix listsendpay flake#9241
Lagrang3 wants to merge 2 commits into
ElementsProject:masterfrom
Lagrang3:fix-listsendpay-flake

Conversation

@Lagrang3

@Lagrang3 Lagrang3 commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

listsendpays: discriminate ongoing payment by groupid

A payment attempt in listpays is defined as pair (payment hash, group id).
If we query xpay if there are any ongoing payments we must discrimitate
using both values.

Fixes flaky test tests/test_pay.py:test_sendpay_grouping

FAILED tests/test_pay.py::test_sendpay_grouping - AssertionError: assert ['pending', 'pending', 'complete'] == ['failed', 'failed', 'complete']

Detected while running CI on #9228.

Fixes #9233

@Lagrang3 Lagrang3 force-pushed the fix-listsendpay-flake branch 2 times, most recently from b65a47f to 232250b Compare June 22, 2026 07:37
@Lagrang3

Copy link
Copy Markdown
Collaborator Author

I ran this 10 times locally and it passes

tests/test_pay.py::test_sendpay_grouping[0] PASSED                                                                                                                                                          [ 10%]
tests/test_pay.py::test_sendpay_grouping[1] PASSED                                                                                                                                                          [ 20%]
tests/test_pay.py::test_sendpay_grouping[2] PASSED                                                                                                                                                          [ 30%]
tests/test_pay.py::test_sendpay_grouping[3] PASSED                                                                                                                                                          [ 40%]
tests/test_pay.py::test_sendpay_grouping[4] PASSED                                                                                                                                                          [ 50%]
tests/test_pay.py::test_sendpay_grouping[5] PASSED                                                                                                                                                          [ 60%]
tests/test_pay.py::test_sendpay_grouping[6] PASSED                                                                                                                                                          [ 70%]
tests/test_pay.py::test_sendpay_grouping[7] PASSED                                                                                                                                                          [ 80%]
tests/test_pay.py::test_sendpay_grouping[8] PASSED                                                                                                                                                          [ 90%]
tests/test_pay.py::test_sendpay_grouping[9] PASSED                                                                                                                                                          [100%]

================================================================================= 10 passed, 150 deselected in 880.06s (0:14:40) ==================================================================================

@Lagrang3 Lagrang3 added the Status::Ready for Review The work has been completed and is now awaiting evaluation or approval. label Jun 22, 2026
@Lagrang3 Lagrang3 requested a review from ddustin June 22, 2026 20:59
@Lagrang3 Lagrang3 added this to the v26.09 milestone Jun 22, 2026
@Lagrang3 Lagrang3 requested a review from ScuttoZ June 22, 2026 20:59
Lagrang3 added 2 commits June 23, 2026 10:42
Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
A payment attempt in listpays is defined as pair (payment hash, group id).
If we query xpay for ongoing payments we must discriminate
using both values.

Fixes flaky test tests/test_pay.py:test_sendpay_grouping
```
FAILED tests/test_pay.py::test_sendpay_grouping - AssertionError: assert ['pending', 'pending', 'complete'] == ['failed', 'failed', 'complete']
```

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
@Lagrang3 Lagrang3 force-pushed the fix-listsendpay-flake branch from 232250b to a0c4943 Compare June 23, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status::Ready for Review The work has been completed and is now awaiting evaluation or approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI Flake test_sendpay_grouping

1 participant