Skip to content

Comments

Fix flaky wallet funding tests#3253

Merged
t-bast merged 1 commit intomasterfrom
fix-flaky-channel-tests
Feb 23, 2026
Merged

Fix flaky wallet funding tests#3253
t-bast merged 1 commit intomasterfrom
fix-flaky-channel-tests

Conversation

@t-bast
Copy link
Member

@t-bast t-bast commented Feb 20, 2026

We fix a few flaky tests in our channel FSM that test scenarios where errors are received while creating funding transactions. The issue was that we used a dummy wallet that could complete its call before our calls to awaitCond(alice.stateName == WAIT_FOR_FUNDING_INTERNAL).

We use a new dummy on-chain wallet that never responds to transaction funding calls to allow tests to inject failure events.

We fix a few flaky tests in our channel FSM that test scenarios where
errors are received while creating funding transactions. The issue was
that we used a dummy wallet that could complete its call before our
calls to `awaitCond(alice.stateName == WAIT_FOR_FUNDING_INTERNAL)`.

We use a new dummy on-chain wallet that never responds to transaction
funding calls to allow tests to inject failure events.
@t-bast t-bast requested review from pm47 and sstone February 20, 2026 15:57
@sstone
Copy link
Member

sstone commented Feb 23, 2026

LGTM but could we also fix the flaky tests by waiting until channels transitions to WAIT_FOR_FUNDING_SIGNED instead of WAIT_FOR_FUNDING_INTERNAL ?

@t-bast
Copy link
Member Author

t-bast commented Feb 23, 2026

LGTM but could we also fix the flaky tests by waiting until channels transitions to WAIT_FOR_FUNDING_SIGNED instead of WAIT_FOR_FUNDING_INTERNAL ?

That wouldn't test the same FSM state, we explicitly want to test what happens while events fire before we've successfully funded the transaction. We have tests for the later states already in separate files.

@t-bast t-bast merged commit 9709a91 into master Feb 23, 2026
1 check passed
@t-bast t-bast deleted the fix-flaky-channel-tests branch February 23, 2026 15:03
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.

2 participants