Skip to content

itest: move harnesses to lntest miners and harden waits#2041

Draft
bhandras wants to merge 3 commits intolightninglabs:mainfrom
bhandras:itest-flake-fixes
Draft

itest: move harnesses to lntest miners and harden waits#2041
bhandras wants to merge 3 commits intolightninglabs:mainfrom
bhandras:itest-flake-fixes

Conversation

@bhandras
Copy link
Copy Markdown
Member

Summary

This pulls the itest and harness prep work out of the anchor-tx-version PR so the feature review can stay focused.

What Changed

  • update the integration harnesses to the current lntest miner APIs and the lnd snapshot they require
  • replace direct btcd miner RPC usage in the itest helpers with lntest miner helpers
  • keep the mock gRPC TLS helpers compatible with the newer gRPC stack by advertising h2
  • harden the supply-commit, proof-transfer, and custom-channels waits that were showing timing races in CI

Test Coverage

  • make itest backend=btcd icase=spend_change_output_when_proof_transfer_fail
  • scripts/itest_cc_part.sh 8 16 --verbose

Notes

This is intended as a prep PR for the v3 anchor work so that the remaining PR can stack on top with a smaller review surface.

@gemini-code-assist
Copy link
Copy Markdown

Warning

Gemini encountered an error creating the summary. You can try again by commenting /gemini summary.

@bhandras bhandras marked this pull request as draft March 24, 2026 19:13
@bhandras bhandras force-pushed the itest-flake-fixes branch from 021b3d8 to 2642cd3 Compare March 24, 2026 19:17
Update the integration harnesses to the current lnd miner APIs and the
dependency snapshot they require.

- Bump lnd to the latest master snapshot and refresh the dependent
  module graph.
- Replace direct btcd RPC miner usage in the itest harnesses with
  lntest miner helpers.
- Adjust the broad integration test suite and helper code to the new
  miner interfaces.
- Fix the mock gRPC TLS helpers to advertise h2 so courier tests keep
  passing with the newer gRPC stack.
- Keep these changes focused on the harness migration and compatibility
  fallout, leaving the dedicated v3 coverage for a follow-up commit.
Separate the unrelated integration test stabilizations from the harness
migration so the miner API update stays easier to review.

- Wait for canceled custom-channel hodl payments to leave the in-flight
  state before probing the route with a follow-up payment.
- Wait for supply-commit updates to actually reach the mempool before
  mining the follow-on commitment transaction.
- Relax the proof-transfer transfer-list assertions to rely on the
  confirmation height hint instead of the lagging block hash field.
- Keep the coverage focused on existing flaky paths that showed up in
  CI, without changing the anchor-version behavior under test.
@bhandras bhandras force-pushed the itest-flake-fixes branch from 2642cd3 to d715d40 Compare March 24, 2026 19:31
- Wait for the shared MultiSubscription to report active subscriptions
  again after the mock server restarts before publishing msg2.
- The test already waited for the two direct clients, but not for the
  multi-subscription, which left a race where the post-restart message
  could be published before that consumer had reconnected.
- Because this subscription uses an empty filter, a missed publish is
  not recovered from backlog delivery and the test times out on
  readMultiSub.
- Keep the fix test-only so mailbox runtime behavior is unchanged.
- This makes TestServerClientAuthAndRestart pass reliably under race
  runs and matches the failure seen in CI shard 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

1 participant