Skip to content

fix: test_payment_path_scoring failing#4395

Open
okekefrancis112 wants to merge 1 commit intolightningdevkit:mainfrom
okekefrancis112:test_payment_path_scoring
Open

fix: test_payment_path_scoring failing#4395
okekefrancis112 wants to merge 1 commit intolightningdevkit:mainfrom
okekefrancis112:test_payment_path_scoring

Conversation

@okekefrancis112
Copy link

Root Cause

push_pending_event() pushes events to the pending queue without calling self.event_persist_notifier.notify(). The background processor's Sleeper never gets woken up for the new event, it only discovers it when the 100ms poll timeout expires. On slow or loaded CI machines, this can exceed the 5-second EVENT_DEADLINE.

Fix

Added self.event_persist_notifier.notify() after pushing the event, consistent with how events are signaled throughout the rest of the codebase. This immediately wakes the background processor to handle the new event rather than relying on a poll timeout.

Closes: #4085

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Feb 6, 2026

👋 I see @joostjager was un-assigned.
If you'd like another reviewer assignment, please click here.

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmm, test-only code so just gonna land this. Didn't bother to look into if it fixes the issue but it might very well (though I haven't seen that test flake in a longggg time).

@TheBlueMatt TheBlueMatt removed the request for review from joostjager February 6, 2026 17:50
@okekefrancis112
Copy link
Author

Mmm, test-only code so just gonna land this. Didn't bother to look into if it fixes the issue but it might very well (though I haven't seen that test flake in a longggg time).

The fix ensures push_pending_event notifies the event_persist_notifier, which wakes the background processor's sleeper immediately instead of waiting for the 100ms poll timeout. It was the only event-producing path that didn't signal the notifier. Low risk since it's test-only code.

@codecov
Copy link

codecov bot commented Feb 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.03%. Comparing base (924f77f) to head (1d90fce).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4395   +/-   ##
=======================================
  Coverage   86.03%   86.03%           
=======================================
  Files         156      156           
  Lines      103002   103036   +34     
  Branches   103002   103036   +34     
=======================================
+ Hits        88620    88652   +32     
- Misses      11873    11876    +3     
+ Partials     2509     2508    -1     
Flag Coverage Δ
tests 86.03% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_payment_path_scoring is flaky

3 participants