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

Copy link
Copy Markdown
Collaborator

listsendpays: discrimitate 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.

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
@Lagrang3 Lagrang3 force-pushed the fix-listsendpay-flake branch from 81c6ac1 to b65a47f Compare June 22, 2026 07:36
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 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
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.

1 participant