Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lntest: add temporary wait when closing channels #7607

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

yyforyongyu
Copy link
Member

@yyforyongyu yyforyongyu commented Apr 18, 2023

A temporary solution to avoid the link failed to shutdown error.

This should be removed once #6039 is fixed.

Error trace,

 harness.go:1145: 
        	Error Trace:	D:\a\lnd\lnd\itest\harness.go:1145
        	            				D:\a\lnd\lnd\itest\harness.go:1174
        	            				D:\a\lnd\lnd\itest\lnd_forward_interceptor_test.go:343
        	            				D:\a\lnd\lnd\itest\harness.go:286
        	            				D:\a\lnd\lnd\itest\lnd_test.go:136
        	Error:      	Received unexpected error:
        	            	received err from close channel stream: rpc error: code = Unknown desc = link failed to shutdown
        	Test:       	TestLightningNetworkDaemon/tranche03/104-of-129/btcd/forward_interceptor

@yyforyongyu yyforyongyu added itests Issues related to integration tests. flake fix no-changelog labels Apr 18, 2023
@yyforyongyu yyforyongyu self-assigned this Apr 18, 2023
@saubyk saubyk requested a review from ellemouton April 18, 2023 15:18
Copy link
Collaborator

@ellemouton ellemouton left a comment

Choose a reason for hiding this comment

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

LGTM!

// NoError predicates every 200ms, which is too
// frequent for closing channels. We sleep here to
// avoid trying it too much.
time.Sleep(2 * time.Second)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

if we realise that we need to tweak the PollInterval used in wait.Predicate often in future then we can perhaps consider adding a functional option to make it configurable. But not needed for this since this is a temp workaround

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point! Yeah def make sense to make it configurable!

A temporary solution to avoid the `link failed to shutdown` error.
@yyforyongyu yyforyongyu force-pushed the itest-fix-close-chan branch from bbf9846 to 6aaca56 Compare April 18, 2023 17:07
@yyforyongyu yyforyongyu requested a review from guggero April 19, 2023 08:42
Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@guggero guggero merged commit d939674 into lightningnetwork:master Apr 19, 2023
@yyforyongyu yyforyongyu deleted the itest-fix-close-chan branch April 19, 2023 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flake fix itests Issues related to integration tests. no-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants