Skip to content

Conversation

@jnewbery
Copy link
Contributor

Commit 9db8eec improved the
assert_raises_jsonrpc() function for better testing of RPC failure
modes. This commit continues the job by removing remaining broken
try-except RPC testing from individual test cases and replacing it
with calls to assert_raises_jsonrpc().

Note that this does not fully complete the job. This commit replaces the try/except code with assert_raises_jsonrpc() only for those test cases where no changes to bitcoind were required (ie the test cases weren't necessarily fully testing the behaviour, but the behaviour was correct anyway). For any test cases where fixing the test code has revealed bugs or inconsistencies, I'll raise a separate issue/PR (eg #9738, #9714, #9841, #9710). There are a few more of those to come.

@jonasschnelli
Copy link
Contributor

Thanks for the cleanup. Factor out the try/catches makes the tests much more readable.
utACK f59cacd

@laanwj laanwj self-assigned this Mar 6, 2017
assert_is_hash_string,
start_nodes,
connect_nodes_bi,
connect_nodes_bi
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need to remove the coma here.

@jnewbery
Copy link
Contributor Author

jnewbery commented Mar 7, 2017

@jnewbery
Copy link
Contributor Author

jnewbery commented Mar 7, 2017

@jnewbery
Copy link
Contributor Author

jnewbery commented Mar 8, 2017

oops. Merge issues from priority removal. Should be fixed now.

@jnewbery jnewbery force-pushed the rpctestassert2 branch 2 times, most recently from cff1b40 to 364db21 Compare March 9, 2017 20:31
@jnewbery
Copy link
Contributor Author

jnewbery commented Mar 9, 2017

rebased

Commit 9db8eec improved the
assert_raises_jsonrpc() function for better testing of RPC failure
modes. This commit completes the job by removing remaining broken
try-except RPC testing from the individual test cases and replacing it
with calls to assert_raises_jsonrpc().
@jnewbery
Copy link
Contributor Author

rebased. Any chance of getting this merged soon?

@maflcko
Copy link
Member

maflcko commented Mar 16, 2017

utACK c9bd0f6

@maflcko maflcko merged commit c9bd0f6 into bitcoin:master Mar 16, 2017
maflcko pushed a commit that referenced this pull request Mar 16, 2017
c9bd0f6 Fix RPC failure testing (2 of 2) (John Newbery)

Tree-SHA512: df30e6e85abe8c4e12910dc60699f1201e9c243457abd738c1fdeac45f0ff05c674f68619ad9a47c847ec557954007d672cd89d3a9a3b2398dd188d9ffa6dcc9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request May 6, 2019
…9707)

c9bd0f6 Fix RPC failure testing (2 of 2) (John Newbery)

Tree-SHA512: df30e6e85abe8c4e12910dc60699f1201e9c243457abd738c1fdeac45f0ff05c674f68619ad9a47c847ec557954007d672cd89d3a9a3b2398dd188d9ffa6dcc9

s/serialize_with_witness/serialize/

miss a tx_submit -> sendrawtransaction

dropped dip4

Fix tests

Signed-off-by: Pasta <[email protected]>

Fix file permissions
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants