Skip to content

fix: fix flaky calling_sync_routing_table by capturing timestamp earlier - #4399

Open
okekefrancis112 wants to merge 1 commit into
lightningdevkit:mainfrom
okekefrancis112:fix_sync_routing_table
Open

okekefrancis112 wants to merge 1 commit into
lightningdevkit:mainfrom
okekefrancis112:fix_sync_routing_table

Conversation

@okekefrancis112

Copy link
Copy Markdown
Contributor

This PR fixes flakiness in the calling_sync_routing_table test in lightning/src/routing/gossip.rs under CI load by capturing expected_timestamp before calling peer_connected(). Previously, the test captured the timestamp after the call, so under load any elapsed time could cause assertions comparing msg.first_timestamp against expected_timestamp to fail. Moving the capture earlier ensures expected_timestamp <= msg.first_timestamp, making the assertions deterministic while leaving test logic unchanged. This change addresses intermittent CI failures without affecting functionality.

Closes: #3875

@ldk-reviews-bot

ldk-reviews-bot commented Feb 8, 2026 •

Copy link
Copy Markdown

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

@codecov

codecov Bot commented Feb 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.02%. Comparing base (2e4a2ac) to head (38a17ee).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4399      +/-   ##
==========================================
- Coverage   86.02%   86.02%   -0.01%     
==========================================
  Files         156      156              
  Lines      103100   103100              
  Branches   103100   103100              
==========================================
- Hits        88693    88690       -3     
  Misses      11896    11896              
- Partials     2511     2514       +3     
Flag Coverage Δ
tests 86.02% <100.00%> (-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.

@TheBlueMatt
TheBlueMatt removed the request for review from valentinewallace February 9, 2026 13:09
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.

calling_sync_routing_table is flaky

2 participants