-
Notifications
You must be signed in to change notification settings - Fork 38.7k
test: Fix wait_for_debug_log UnicodeDecodeError #25294
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
The head ref may contain hidden characters: "2206-test-emoji-decode-\u{1F3B2}"
Conversation
jonatack
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.
ACK
faf4c03 to
fa74b63
Compare
|
ACK fa74b63 |
brunoerg
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.
ACK fa74b63
fa74b63 test: Fix wait_for_debug_log UnicodeDecodeError (MacroFake) Pull request description: Fix the intermittent `UnicodeDecodeError` when the debug log is truncated on an (multi-byte) unicode character by treating everything as bytes. Also, remove the `ignore_case` option and the`re.search+re.escape` wrap. All of this is unused and doesn't exist on raw byte strings. Fixes bitcoin#24575 ACKs for top commit: jonatack: ACK fa74b63 brunoerg: ACK fa74b63 Tree-SHA512: c67c9355073e784fa8d9d48b8e79ff0c98f5ae9cd4d704ad12a76d2604733946054bc74b8ab346aa2184db23d740b85c8c13eb892d76cba92e42ebfd73f2f1bf
|
@MarcoFalke I think line 451 of test_node.py is now broken.
This could work |
Summary: > Fix the intermittent UnicodeDecodeError when the debug log is truncated on an (multi-byte) unicode character by treating everything as bytes. > > Also, remove the ignore_case option and there.search+re.escape wrap. All of this is unused and doesn't exist on raw byte strings. This is a backport of [[bitcoin/bitcoin#25294 | core#25294]] Depends on D12622 Note: I added a typehint for `expected_msgs` because imo the parameter name is now misleading with regards to its type. This allowed the mypy linter to detect that a subsequent line defining `print_log` is now broken because `log` is now of type `bytes` and you cannot join `bytes` with `str` Test Plan: `ninja check-functional` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D12624
Fix the intermittent
UnicodeDecodeErrorwhen the debug log is truncated on an (multi-byte) unicode character by treating everything as bytes.Also, remove the
ignore_caseoption and there.search+re.escapewrap. All of this is unused and doesn't exist on raw byte strings.Fixes #24575