-
Notifications
You must be signed in to change notification settings - Fork 37.7k
test: Make ua_comment test pass on 0.16.0 #12302
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
Conversation
utACK 0224be7bb45f0faed13ba067d14082f19cc0685a |
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.
utACK.
test/functional/feature_uacomment.py
Outdated
@@ -23,8 +23,8 @@ def run_test(self): | |||
|
|||
self.log.info("test -uacomment max length") | |||
self.stop_node(0) | |||
expected = "Total length of network version string (286) exceeds maximum length (256). Reduce the number or size of uacomments." | |||
self.assert_start_raises_init_error(0, ["-uacomment=" + 'a' * 256], expected) | |||
expected = r"Total length of network version string \([0-9]+\) exceeds maximum length \(256\). Reduce the number or size of uacomments." |
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.
nit, \d+
@@ -283,7 +284,11 @@ def assert_start_raises_init_error(self, i, extra_args=None, expected_msg=None, | |||
if expected_msg is not None: | |||
log_stderr.seek(0) | |||
stderr = log_stderr.read().decode('utf-8') | |||
if expected_msg not in stderr: | |||
if use_re: | |||
match = re.search(expected_msg, stderr) |
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.
nit nit, always treat as regexp and remove option?
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.
no, then I'd have to change all the tests
0224be7
to
031c9a0
Compare
Why not just the minimal fix of:
Rather than changing the |
Sigh... |
Closing this, feel free to fix it in your own way. |
ACK 0224be7bb45f0faed13ba067d14082f19cc0685a (verified that it fixes 0.16.0) Let's just merge a fix and move on, this is too much bikeshedding imo. |
031c9a0
to
197982b
Compare
The specific length of the uacomment is one shorter on `0.16.0` than on `0.15.99` causing the (stupid) test to fail. Just match the latter part of the message only.
197982b
to
aac6bce
Compare
ACK aac6bce I agree with the longer term goal of changing |
utACK aac6bce Didn't test that this fixes 0.16. Going to merge and cross fingers... |
aac6bce test: Make ua_comment test pass on 0.16.0 (Wladimir J. van der Laan) Pull request description: The specific length of the uacomment is one shorter on `0.16.0` than on `0.15.99` causing the (stupid) test to fail. This change makes `assert_start_raises_init_error` optionally take a regexp, so that the error message can be checked without being specific about the reported length. Tree-SHA512: 1c5e9f1d0b36f004f8113c7e211e8281194ce8057869ac3702172d8b021df3c3aa3b8f79b9434678ed0fb7146f848802410647d434fc884aa200b6a5e26afe8b
(also tested it fixes v0.16 for me) |
The specific length of the uacomment is one shorter on `0.16.0` than on `0.15.99` causing the (stupid) test to fail. Just match the latter part of the message only. Github-Pull: bitcoin#12302 Rebased-From: aac6bce
The specific length of the uacomment is one shorter on `0.16.0` than on `0.15.99` causing the (stupid) test to fail. Just match the latter part of the message only. Github-Pull: #12302 Rebased-From: aac6bce Tree-SHA512: 9edecbe2529584d6d01296ec153330bb44add8445fef139d7b7a667b86fef8ee3aafea55d95ac109c9fef079133709f69798477e3eba92744ea2f6c8f5acbb7d
The specific length of the uacomment is one shorter on `0.16.0` than on `0.15.99` causing the (stupid) test to fail. Just match the latter part of the message only. Github-Pull: bitcoin#12302 Rebased-From: aac6bce Tree-SHA512: 9edecbe2529584d6d01296ec153330bb44add8445fef139d7b7a667b86fef8ee3aafea55d95ac109c9fef079133709f69798477e3eba92744ea2f6c8f5acbb7d
aac6bce test: Make ua_comment test pass on 0.16.0 (Wladimir J. van der Laan) Pull request description: The specific length of the uacomment is one shorter on `0.16.0` than on `0.15.99` causing the (stupid) test to fail. This change makes `assert_start_raises_init_error` optionally take a regexp, so that the error message can be checked without being specific about the reported length. Tree-SHA512: 1c5e9f1d0b36f004f8113c7e211e8281194ce8057869ac3702172d8b021df3c3aa3b8f79b9434678ed0fb7146f848802410647d434fc884aa200b6a5e26afe8b
aac6bce test: Make ua_comment test pass on 0.16.0 (Wladimir J. van der Laan) Pull request description: The specific length of the uacomment is one shorter on `0.16.0` than on `0.15.99` causing the (stupid) test to fail. This change makes `assert_start_raises_init_error` optionally take a regexp, so that the error message can be checked without being specific about the reported length. Tree-SHA512: 1c5e9f1d0b36f004f8113c7e211e8281194ce8057869ac3702172d8b021df3c3aa3b8f79b9434678ed0fb7146f848802410647d434fc884aa200b6a5e26afe8b
aac6bce test: Make ua_comment test pass on 0.16.0 (Wladimir J. van der Laan) Pull request description: The specific length of the uacomment is one shorter on `0.16.0` than on `0.15.99` causing the (stupid) test to fail. This change makes `assert_start_raises_init_error` optionally take a regexp, so that the error message can be checked without being specific about the reported length. Tree-SHA512: 1c5e9f1d0b36f004f8113c7e211e8281194ce8057869ac3702172d8b021df3c3aa3b8f79b9434678ed0fb7146f848802410647d434fc884aa200b6a5e26afe8b
The specific length of the uacomment is one shorter on
0.16.0
than on0.15.99
causing the (stupid) test to fail.This change makes
assert_start_raises_init_error
optionally take a regexp, so that the error message can be checked without being specific about the reported length.