-
Notifications
You must be signed in to change notification settings - Fork 38.7k
[qa] 0.15.1 Backports #11445
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
Merged
Merged
[qa] 0.15.1 Backports #11445
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TestNode is a class responsible for all state related to a bitcoind node under test. It stores local state, is responsible for tracking the bitcoind process and delegates unrecognised messages to the RPC connection. This commit changes start_nodes and stop_nodes to start and stop the bitcoind nodes in parallel, making test setup and teardown much faster. Github-Pull: bitcoin#10711 Rebased-From: 7897338
When running the tests locally with a parallelism of 4 on an otherwise busy system, RPC can take quite a wait to come up. Change the timeout to 60 seconds just to be safe. Github-Pull: bitcoin#11091 Rebased-From: c1470a0
Fixes a couple of bugs from the introduction of TestNode: - test scripts were no longer able to specify a custom timeout for starting a node. Therefore tests with nodes that take a long time to start up (eg pruning.py) would fail. - the test for whether a node has failed on start up was broken by changing 'assert x is None' to 'assert not x'. Since subprocess.poll() can return None (indicating the node is still running) or 0 (indicating the node exited with return code 0), this was a regression. Github-Pull: bitcoin#11077 Rebased-From: 2b4ea52
Github-Pull: bitcoin#11068 Rebased-From: 08ce33f
Github-Pull: bitcoin#10798 Rebased-From: b23549f
Github-Pull: bitcoin#10798 Rebased-From: c6ec435
Github-Pull: bitcoin#10859 Rebased-From: 6d2d2eb
Github-Pull: bitcoin#11150 Rebased-From: 4f2905b
Github-Pull: bitcoin#11121 Rebased-From: be2a2ab
Separates the act of creating a TestNode object from starting the node. The test_framework now keeps track of its list of TestNodes, and test writers can call start_node() and stop_node() without having to update the self.nodes list. Github-Pull: bitcoin#11121 Rebased-From: 36b6268
Github-Pull: bitcoin#11121 Rebased-From: 6cf094a
Almost all test scripts currently need to override the __init__() method. When they do that they need to call into super().__init__() as the base class does some generic initialization. This commit makes the base class __init__() call into set_test_params() method. Individual test cases can override set_test_params() to setup their test parameters. Github-Pull: bitcoin#11121 Rebased-From: 5448a14
Github-Pull: bitcoin#11121 Rebased-From: 7148b74
Github-Pull: bitcoin#11215 Rebased-From: 3918d93
This patch improves branch coverage of the test, making sure a message can not be verified with the wrong address or signature. Github-Pull: bitcoin#11241 Rebased-From: b3d6fc6
Github-Pull: bitcoin#11234 Rebased-From: d1138e3
Github-Pull: bitcoin#11210 Rebased-From: dea086f
Github-Pull: bitcoin#11067 Rebased-From: faa8d95
Github-Pull: bitcoin#11125 Rebased-From: e127494
Github-Pull: bitcoin#11125 Rebased-From: 5c18a84
Github-Pull: bitcoin#11125 Rebased-From: 232e3e8
Github-Pull: bitcoin#11125 Rebased-From: ce379b4
9c534ec to
86be17a
Compare
Github-Pull: bitcoin#11230 Rebased-From: 8fdb6f9
Github-Pull: bitcoin#11310 Rebased-From: fb1f325
Github-Pull: bitcoin#11308 Rebased-From: fadd0c1
Github-Pull: bitcoin#11078 Rebased-From: 0063d2c
assumevalid.py would try to send over a closed P2P connection in a loop, hitting the following failure many times: TestFramework.mininode (ERROR): Cannot send message. No connection to node! The test still passes, but this is a lot of noise in the test log. Just check that the connection is open before trying to send. Github-Pull: bitcoin#11345 Rebased-From: e9e9391
Github-Pull: bitcoin#11116 Rebased-From: d7afe2d
Does not test watch-only addresses. Github-Pull: bitcoin#11116 Rebased-From: 7a1e873
Github-Pull: bitcoin#10552 Rebased-From: d3677ab
Github-Pull: bitcoin#11319 Rebased-From: a782042
Changing __init__() -> set_test_params() in the tests should not have applied to NodeConnCB-derived objects. Github-Pull: bitcoin#11319 Rebased-From: f97ab35
The LevelDB docs seem to indicate that an iterator will not take snapshots (even providing instructions on how to do so yourself). In several of the places we use them, we assume snapshots to have been taken. In order to make sure LevelDB doesn't change out from under us (and to prevent the next person who reads the docs from having the same fright I did), verify that snapshots are taken in our tests. Github-Pull: bitcoin#11422 Rebased-From: bb8376b
Github-Pull: bitcoin#11399 Rebased-From: 49f869f
Github-Pull: bitcoin#11407 Rebased-From: 1088b53
86be17a to
806c78f
Compare
Github-Pull: bitcoin#11433 Rebased-From: fafff12
Member
|
utACK |
Github-Pull: bitcoin#11443 Rebased-From: fae60e3
Member
|
utACK 019c492 |
laanwj
added a commit
that referenced
this pull request
Oct 11, 2017
019c492 qa: Fix lcov for out-of-tree builds (MarcoFalke) e169349 qa: Restore bitcoin-util-test py2 compatibility (MarcoFalke) 806c78f add functional test for mempoolreplacement command line arg (Gregory Sanders) a825d4a Fix bip68-sequence rpc test (Johnson Lau) a36f332 Verify DBWrapper iterators are taking snapshots (Matt Corallo) 8d2e51d qa: Fix bug introduced in p2p-segwit.py (Suhas Daftuar) 2f0b30a qa: Treat mininode p2p exceptions as fatal (Suhas Daftuar) e4605d9 Tests for zmqpubrawtx and zmqpubrawblock (Andrew Chow) 2c4ff35 [script] Unit tests for IsMine (Jim Posen) 794a80e [script] Unit tests for script/standard functions (Jim Posen) f9cf7b5 [tests] Check connectivity before sending in assumevalid.py (John Newbery) f1ced0d [tests] Make p2p-leaktests.py more robust (John Newbery) 2e1ac70 [qa] zapwallettxes: Wait up to 3s for mempool reload (MarcoFalke) b6468d3 Add listwallets RPC test to multiwallet.py (Cristian Mircea Messel) d8dd8e7 [tests] fixup dbcrash interaction with add_nodes() (John Newbery) 2b97b36 [test] Replace check_output with low level version (João Barbosa) e38211f [test] Add assert_raises_process_error to assert process errors (João Barbosa) e0bfd28 [test] Add support for custom arguments to TestNodeCLI (João Barbosa) 812c870 [test] Improve assert_raises_jsonrpc docstring (João Barbosa) eeb24a3 [qa] TestNode: Add wait_until_stopped helper method (MarcoFalke) f3f7891 Stop test_bitcoin-qt touching ~/.bitcoin (MeshCollider) f0b6795 Remove redundant testutil files (MeshCollider) 4424176 Improve signmessages functional test (Cristian Mircea Messel) cef0319 [tests] fixups from set_test_params() (John Newbery) 82bf6fc [tests] Functional tests must explicitly set num_nodes (John Newbery) 801d2ae [tests] don't override __init__() in individual tests (John Newbery) bb5e7cb [tests] Avoid passing around member variables in test_framework (John Newbery) 4d3ba18 [tests] TestNode: separate add_node from start_node (John Newbery) 11a5992 [tests] fix - use rpc_timeout as rpc timeout (John Newbery) 847c75e Add getmininginfo functional test (Cristian Mircea Messel) 2a5d099 RPC: gettxout: Slightly improve doc and tests (Jorge Timón) 716066d [tests] Add bitcoin_cli.py test script (John Newbery) 016b9ad [tests] add TestNodeCLI class for calling bitcoin-cli for a node (John Newbery) 5398f20 qa: Move wait_until to util (MarcoFalke) 1d80d1e [tests] fix timeout issues from TestNode (John Newbery) c276c1e test: Increase initial RPC timeout to 60 seconds (Wladimir J. van der Laan) fc2aa09 [tests] Introduce TestNode (John Newbery) Pull request description: This includes test related backports for 0.15.1. The motivation is twofold: * Make backporting new tests written for current master easier * Fix the most common test issues that happen(ed) frequently on travis Even though this includes the new TestNode class, which comes with a lot of refactoring, I believe that the issues caused by refactoring are found and fixed by now. Tree-SHA512: 6a0c4e5246da83ff0b3f7d2cb8df358d105ed548fb3857e5d882f26cc336553aa07b39e38c281879bf82f95078298b775334f9a60c0b23140f77c50174bd8347
UdjinM6
added a commit
to dashpay/dash
that referenced
this pull request
Sep 27, 2019
Backport same PRs as done in bitcoin#11445
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This includes test related backports for 0.15.1. The motivation is twofold:
Even though this includes the new TestNode class, which comes with a lot
of refactoring, I believe that the issues caused by refactoring are found
and fixed by now.