aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
AgeCommit message (Collapse)Author
2017-10-03qa: Treat mininode p2p exceptions as fatalSuhas Daftuar
Github-Pull: #11319 Rebased-From: a7820422e0b182db6f1df8904242e5d76d6c73fa
2017-10-03Tests for zmqpubrawtx and zmqpubrawblockAndrew Chow
Github-Pull: #10552 Rebased-From: d3677ab757ea57b21d8aed24d5bc3c4bfe9bb68c
2017-10-03[tests] Make p2p-leaktests.py more robustJohn Newbery
Github-Pull: #11078 Rebased-From: 0063d2c3dce9d9c1678197d2c65ee878793d1ef9
2017-10-03[test] Replace check_output with low level versionJoão Barbosa
Github-Pull: #11125 Rebased-From: ce379b47b92d6c04250c21719bb1abfb41c586ad
2017-10-03[test] Add assert_raises_process_error to assert process errorsJoão Barbosa
Github-Pull: #11125 Rebased-From: 232e3e8471edb346c09f906c996b2f350cabc72a
2017-10-03[test] Add support for custom arguments to TestNodeCLIJoão Barbosa
Github-Pull: #11125 Rebased-From: 5c18a84b9a49e3f9dacf0502dbf7d5d755f38da6
2017-10-03[test] Improve assert_raises_jsonrpc docstringJoão Barbosa
Github-Pull: #11125 Rebased-From: e1274947d4574bb83a020d0e178f0e5db7fc6282
2017-10-03[qa] TestNode: Add wait_until_stopped helper methodMarcoFalke
Github-Pull: #11067 Rebased-From: faa8d9581affde35a8242c63fca8a52004d4f943
2017-10-03[tests] Functional tests must explicitly set num_nodesJohn Newbery
Github-Pull: #11121 Rebased-From: 7148b74dc39110f53c665b94fa9d994c6ad6dc1c
2017-10-03[tests] don't override __init__() in individual testsJohn Newbery
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: #11121 Rebased-From: 5448a1471d6fc638a2220ea5a2f3782172efe14c
2017-10-03[tests] Avoid passing around member variables in test_frameworkJohn Newbery
Github-Pull: #11121 Rebased-From: 6cf094a0229d051ab8a15189c8a0bc6011919e72
2017-10-03[tests] TestNode: separate add_node from start_nodeJohn Newbery
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: #11121 Rebased-From: 36b626867087e9fae6d85f926248997ebff327b7
2017-10-03[tests] fix - use rpc_timeout as rpc timeoutJohn Newbery
Github-Pull: #11121 Rebased-From: be2a2ab6a67beef97e3c3cf42bd5eeea6c4e55cf
2017-10-03[tests] add TestNodeCLI class for calling bitcoin-cli for a nodeJohn Newbery
Github-Pull: #10798 Rebased-From: b23549f6e677a8e22953568704eac7ea0c2c1289
2017-10-03qa: Move wait_until to utilMarcoFalke
Github-Pull: #11068 Rebased-From: 08ce33f8e95efa81b37ddc6b3350462c61bbfd51
2017-10-03[tests] fix timeout issues from TestNodeJohn Newbery
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: #11077 Rebased-From: 2b4ea520b717b3ca894adbac17796786667764d3
2017-10-03test: Increase initial RPC timeout to 60 secondsWladimir J. van der Laan
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: #11091 Rebased-From: c1470a058f21bf98d83b9dc345c61626b87035cc
2017-10-03[tests] Introduce TestNodeJohn Newbery
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: #10711 Rebased-From: 7897338918dac072e788b8ab2919d4559f311bef
2017-08-11Merge #11023: [tests] Add option to attach a python debugger if functional ↵MarcoFalke
test fails cc5d38f4b Add option to attach a python debugger if test fails (John Newbery) Pull request description: Adds a simple option to the test_framework to attach pdb if the test fails. Helpful for catching and debugging intermittent failures: Run the test in a loop with this option. The first failure will cause execution to pause and nodes will be left running for interactive debugging. @sdaftuar Tree-SHA512: 01cfae15fa3f04ed6ec6a99fef60a6c6a59723429309e81eacd6767caf12f5758f59b337804291ecab33a38a2958f36e2b513d201bee72a2eeb207a67046f952
2017-08-10Add option to attach a python debugger if test failsJohn Newbery
2017-08-07[tests] Test disconnecting unsupported service bits logic.John Newbery
In v0.15, we disconnect nodes that send us version messages with unsupported service bits (1 << 5 and 1 << 7). This commit adds a test that bitcoind will disconnect those nodes before August 1st 2018, and won't disconnect those nodes after August 1st 2018.
2017-07-17[tests] [wallet] Add wallet endpoint support to authproxyJohn Newbery
2017-07-06Fix multi_rpc test for hosts that dont default to utf8Matt Corallo
Otherwise the utf8 written to bitcoin.conf throws an exception when read from get_auth_cookie
2017-07-02[tests] nits in dbcrash.pyJohn Newbery
2017-06-29[tests] fix nits.John Newbery
Thanks to Marco Falke.
2017-06-29[tests] reorganize utils.py module (code move only)John Newbery
This commit re-organizes the utils.py module into logical sections.
2017-06-29[tests] move mocktime property and functions to BitcoinTestFrameworkJohn Newbery
2017-06-29[tests] Move stop_node and start_node methods to BitcoinTestFrameworkJohn Newbery
This commit moves functions start_node, start_nodes, stop_node and stop_nodes functions into the BitcoinTestFramework class. It also moves the bitcoind_processes dict and coverage variables into BitcoinTestFramework.
2017-06-29[tests] fix flake8 warnings in test_framework.py and util.pyJohn Newbery
2017-06-29[tests] remove unused imports from utils.pyJohn Newbery
2017-06-28Merge #10148: Use non-atomic flushing with block replayWladimir J. van der Laan
176c021 [qa] Test non-atomic chainstate writes (Suhas Daftuar) d6af06d Dont create pcoinsTip until after ReplayBlocks. (Matt Corallo) eaca1b7 Random db flush crash simulator (Pieter Wuille) 0580ee0 Adapt memory usage estimation for flushing (Pieter Wuille) 013a56a Non-atomic flushing using the blockchain as replay journal (Pieter Wuille) b3a279c [MOVEONLY] Move LastCommonAncestor to chain (Pieter Wuille) Tree-SHA512: 47ccc62303f9075c44d2a914be75bd6969ff881a857a2ff1227f05ec7def6f4c71c46680c5a28cb150c814999526797dc05cf2701fde1369c06169f46eccddee
2017-06-28Merge #10690: [qa] Bugfix: allow overriding extra_args in ↵MarcoFalke
ComparisonTestFramework 4ed3653 [qa] Bugfix: allow overriding extra_args in ComparisonTestFramework (Suhas Daftuar) Tree-SHA512: d8f724b3324aad73a7b15cf87ff394e8d615bf3cd5a394d5715347d833f2ae9ac745a944202986866255eca5fc105ea06ab3abe12e168b67de34482f751c68e2
2017-06-28[qa] Bugfix: allow overriding extra_args in ComparisonTestFrameworkSuhas Daftuar
2017-06-26[qa] Test non-atomic chainstate writesSuhas Daftuar
Adds new functional test, dbcrash.py, which uses -dbcrashratio to exercise the logic for recovering from a crash during chainstate flush. dbcrash.py is added to the extended tests, as it may take ~10 minutes to run Use _Exit() instead of exit() for crash simulation This eliminates stderr output such as: terminate called without an active exception or Assertion failed: (!pthread_mutex_destroy(&m)), function ~recursive_mutex, file /usr/local/include/boost/thread/pthread/recursive_mutex.hpp, line 104. Eliminating the stderr output on crash simulation allows testing with test_runner.py, which reports a test as failed if stderr is produced.
2017-06-22Merge #10633: doc: Fix various typosWladimir J. van der Laan
0a5a6b9 Fixed multiple typos (Dimitris Tsapakidis) Tree-SHA512: 57748710bcbc03945b160db5e95bd686a2c64605f25d5e11d8ed9d0e1be3b3bf287a63588dc6eb33d0cef4ff17c765fda7c226d667a357acc539c8fcf2b9bb7e
2017-06-22Merge #10636: [qa] util: Check return code after closing bitcoind procMarcoFalke
999923e [qa] util: Check return code after closing bitcoind proc (MarcoFalke) Tree-SHA512: 1aa911e5ce25ef59b006b7f8f25e5eef3c6c31f1b4362564e158ed92dd7804625fccc08be8b98c8c32779b530a8ec988819947692698214e34f5cb1d411c9eda
2017-06-22Fixed multiple typosDimitris Tsapakidis
A few "a->an" and "an->a". "Shows, if the supplied default SOCKS5 proxy" -> "Shows if the supplied default SOCKS5 proxy". Change made on 3 occurrences. "without fully understanding the ramification of a command" -> "without fully understanding the ramifications of a command". Removed duplicate words such as "the the".
2017-06-20[qa] util: Check return code after closing bitcoind procMarcoFalke
This has no effect on the outcome of test cases, but prints shorter and less confusing tracebacks on fails. I.e. does not print an obvious "ConnectionRefusedError" when shutting down the nodes due to an invalid return code.
2017-06-18Check for rpcuser/rpcpassword first then for cookieAndrew Chow
Better to check that rpcuser and rpcpassword exist then to check for the cookie in the test framework. Name an argument for consistency in p2p-segwit.py
2017-06-08Add test for rpcuser/rpcpasswordAndrew Chow
2017-06-08Replace cookie auth in testsAndrew Chow
Since rpcuser and rpcpassword are now deprecated, replace them with cookie auth. Fix test failures with cookie auth
2017-06-02Merge #10359: [tests] functional tests should call BitcoinTestFramework ↵MarcoFalke
start/stop node methods 53f6775 fixup: fix nits (John Newbery) a433d8a [tests] Update start/stop node functions to be private module functions (John Newbery) d8c218f [tests] Functional tests call self.start_node(s) and self.stop_node(s) (John Newbery) Tree-SHA512: 9cc01584a5e57686b7e7cb1c4c5186ad8cc7eb650d6d4f27b06bdb5e249a10966705814bdfb22d9ff2d5d3326911e489bf3d22257d751a299c0b24b7f40bffb5
2017-05-31[tests] Update start/stop node functions to be private module functionsJohn Newbery
This commit marks the start/stop functions in util.py as private module functions. A future PR will remove these entirely and move the functionality directly into the BitcoinTestFramework class, but setting them as private in this PR will prevent anyone from accidentally calling them before that future PR is merged.
2017-05-22[tests] skipped tests should clean up after themselvesJohn Newbery
2017-05-18[tests] improve tmpdir structureJohn Newbery
2017-05-09[tests] Make wait_until timeout 60 seconds by defaultJohn Newbery
2017-05-08Merge #10352: test: Add elapsed time to RPC tracingMarcoFalke
20187e4 test: Add elapsed time to RPC tracing (Wladimir J. van der Laan) Tree-SHA512: f271acedd14020cf911711577f6dd940850fa84d2577618af06a2247c940fcc5b339a86c1c7a179899c556d217a6c967c785fb311bba43a9b6073cbe470b6737
2017-05-07Merge #10171: [tests] Add node methods to test frameworkMarcoFalke
4550049 Reorganize BitcoinTestFramework class (John Newbery) b7dd44c Add start and stop node methods to BitcoinTestFramework (John Newbery) b111324 move initialize_chain() and initialize_chain_clean() to be methods of BitcoinTestFramework (John Newbery) Tree-SHA512: 17e541aea8ca4c0d1189701499384e26239e2d5905de8adb0f042d3cf4c0bbed79fcaad61d563e1743bf4c62ad4915cebb4714783db839d9c53dfbbedcae6e9a
2017-05-07test: Add elapsed time to RPC tracingWladimir J. van der Laan
Add elapsed time to output of `--tracerpc`. To find out why tests are slow.
2017-05-06Merge #10318: [tests] fix wait_for_inv()MarcoFalke
3e3c22f [tests] fix wait_for_inv() (John Newbery) Tree-SHA512: b8070b8461e9c792cc3d9c17fd9d3faf87f550c7c0fc1788e0cd382f0794932b70cc87d480805a3b3c1ca2fdca9f8f1bcb9759300d777d9aaa8d41c016260d93