-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fixes to test_long_sync_untrusted_break #20327
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
base: main
Are you sure you want to change the base?
Conversation
AmineKhaldi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done.
| ) | ||
| # And that we only have a trusted peer left | ||
| assert time_out_assert(30, only_trusted_peer) | ||
| await time_out_assert(30, only_trusted_peer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I see I think they just had a thinko about asserting only_trusted_peer's return (which happens by default in time_out_assert) and asserting time_out_assert instead.
This test didn't work properly as the
time_out_assertswere notawaited (but ratherasserted - I'm assuming a typo - but this was not checked by linting)Once changed to proper await one of the checks didn't work at all, so I adjusted the code somewhat to rely on parsing LOG messages
Discovered during Python 3.14 testing which has better checks for missing awaits
Note
Refactors the long untrusted sync test to properly await async asserts, verify disconnect via logs, and remove manual cancel flag for reliable behavior.
chia/_tests/wallet/sync/test_wallet_sync.py):test_long_sync_untrusted_break:await peer.wait_until_closed()and removesync_canceledlogic.await time_out_assert(...)calls and assertstart_client(...)results.caplog.at_level(INFO)) and assert disconnect messages, including connection-closed details.Written by Cursor Bugbot for commit 9d2af5c. This will update automatically on new commits. Configure here.