Alexander Block
fa57eafd00
scripted-diff: rename assert_raises_jsonrpc to assert_raises_rpc error
...
-BEGIN VERIFY SCRIPT-
sed -i 's/assert_raises_jsonrpc/assert_raises_rpc_error/g' test/functional/*py test/functional/test_framework/*py
-END VERIFY SCRIPT-
2019-09-29 12:42:13 +02:00
MarcoFalke
17bb230d74
Merge #11121 : TestNode tidyups
...
7148b74dc
[tests] Functional tests must explicitly set num_nodes (John Newbery)
5448a1471
[tests] don't override __init__() in individual tests (John Newbery)
6cf094a02
[tests] Avoid passing around member variables in test_framework (John Newbery)
36b626867
[tests] TestNode: separate add_node from start_node (John Newbery)
be2a2ab6a
[tests] fix - use rpc_timeout as rpc timeout (John Newbery)
Pull request description:
Some additional tidyups after the introduction of TestNode:
- commit 1 makes TestNode use the correct rpc timeout. This should have been included in #11077
- commit 2 separates `add_node()` from `start_node()` as originally discussed here: https://github.com/bitcoin/bitcoin/pull/10556#discussion_r121161453 with @kallewoof . The test writer no longer needs to assign to `self.nodes` when starting/stopping nodes.
- commit 3 adds a `set_test_params()` method, so individual tests don't need to override `__init__()` and call `super().__init__()`
Tree-SHA512: 0adb030623b96675b5c29e2890ce99ccd837ed05f721d0c91b35378c5ac01b6658174aac12f1f77402e1d38b61f39b3c43b4df85c96952565dde1cda05b0db84
2019-09-24 16:58:03 +02:00
MarcoFalke
f55da3aa54
Merge #10711 : [tests] Introduce TestNode
...
789733891
[tests] Introduce TestNode (John Newbery)
Pull request description:
Continues #10082
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.
On my vm, this changeset reduces total test_runner runtime for the base set of tests
(including building the cache) from 263s to 195s (a 25% speedup). Note that the time
reported by test_runner does not include time spent building the cache:
*with TestNode*:
```
→ date +"%T" ; ./test_runner.py -q ; date +"%T"
12:48:04
..................................................................................................................................................................................................................................................................................................................................
TEST | STATUS | DURATION
abandonconflict.py | ✓ Passed | 12 s
bip68-112-113-p2p.py | ✓ Passed | 19 s
blockchain.py | ✓ Passed | 8 s
bumpfee.py | ✓ Passed | 13 s
decodescript.py | ✓ Passed | 3 s
disablewallet.py | ✓ Passed | 3 s
disconnect_ban.py | ✓ Passed | 6 s
fundrawtransaction.py | ✓ Passed | 37 s
getchaintips.py | ✓ Passed | 4 s
httpbasics.py | ✓ Passed | 3 s
import-rescan.py | ✓ Passed | 4 s
importmulti.py | ✓ Passed | 6 s
importprunedfunds.py | ✓ Passed | 3 s
invalidblockrequest.py | ✓ Passed | 4 s
invalidtxrequest.py | ✓ Passed | 4 s
keypool.py | ✓ Passed | 7 s
listsinceblock.py | ✓ Passed | 4 s
listtransactions.py | ✓ Passed | 33 s
mempool_limit.py | ✓ Passed | 4 s
mempool_persist.py | ✓ Passed | 15 s
mempool_reorg.py | ✓ Passed | 4 s
mempool_resurrect_test.py | ✓ Passed | 3 s
mempool_spendcoinbase.py | ✓ Passed | 3 s
merkle_blocks.py | ✓ Passed | 3 s
multi_rpc.py | ✓ Passed | 4 s
net.py | ✓ Passed | 3 s
nulldummy.py | ✓ Passed | 3 s
p2p-compactblocks.py | ✓ Passed | 28 s
p2p-fullblocktest.py | ✓ Passed | 126 s
p2p-leaktests.py | ✓ Passed | 8 s
p2p-mempool.py | ✓ Passed | 3 s
p2p-segwit.py | ✓ Passed | 59 s
p2p-versionbits-warning.py | ✓ Passed | 8 s
preciousblock.py | ✓ Passed | 3 s
prioritise_transaction.py | ✓ Passed | 5 s
proxy_test.py | ✓ Passed | 3 s
rawtransactions.py | ✓ Passed | 9 s
receivedby.py | ✓ Passed | 19 s
reindex.py | ✓ Passed | 12 s
rest.py | ✓ Passed | 9 s
rpcnamedargs.py | ✓ Passed | 3 s
segwit.py | ✓ Passed | 7 s
sendheaders.py | ✓ Passed | 24 s
signmessages.py | ✓ Passed | 3 s
signrawtransactions.py | ✓ Passed | 3 s
txn_clone.py | ✓ Passed | 4 s
txn_doublespend.py --mineblock | ✓ Passed | 4 s
uptime.py | ✓ Passed | 3 s
wallet-accounts.py | ✓ Passed | 3 s
wallet-dump.py | ✓ Passed | 7 s
wallet-encryption.py | ✓ Passed | 8 s
wallet-hd.py | ✓ Passed | 15 s
wallet.py | ✓ Passed | 31 s
walletbackup.py | ✓ Passed | 104 s
zapwallettxes.py | ✓ Passed | 9 s
zmq_test.py | ○ Skipped | 0 s
ALL | ✓ Passed | 735 s (accumulated)
Runtime: 189 s
12:51:19
```
*master*:
```
→ date +"%T" ; ./test_runner.py -q ; date +"%T"
12:40:13
..........................................................................................................................................................................................................................................................................................................................................................................................................................................
TEST | STATUS | DURATION
abandonconflict.py | ✓ Passed | 15 s
bip68-112-113-p2p.py | ✓ Passed | 19 s
blockchain.py | ✓ Passed | 8 s
bumpfee.py | ✓ Passed | 20 s
decodescript.py | ✓ Passed | 3 s
disablewallet.py | ✓ Passed | 3 s
disconnect_ban.py | ✓ Passed | 8 s
fundrawtransaction.py | ✓ Passed | 36 s
getchaintips.py | ✓ Passed | 11 s
httpbasics.py | ✓ Passed | 7 s
import-rescan.py | ✓ Passed | 16 s
importmulti.py | ✓ Passed | 10 s
importprunedfunds.py | ✓ Passed | 5 s
invalidblockrequest.py | ✓ Passed | 4 s
invalidtxrequest.py | ✓ Passed | 3 s
keypool.py | ✓ Passed | 7 s
listsinceblock.py | ✓ Passed | 11 s
listtransactions.py | ✓ Passed | 37 s
mempool_limit.py | ✓ Passed | 4 s
mempool_persist.py | ✓ Passed | 23 s
mempool_reorg.py | ✓ Passed | 7 s
mempool_resurrect_test.py | ✓ Passed | 3 s
mempool_spendcoinbase.py | ✓ Passed | 3 s
merkle_blocks.py | ✓ Passed | 10 s
multi_rpc.py | ✓ Passed | 6 s
net.py | ✓ Passed | 6 s
nulldummy.py | ✓ Passed | 3 s
p2p-compactblocks.py | ✓ Passed | 30 s
p2p-fullblocktest.py | ✓ Passed | 126 s
p2p-leaktests.py | ✓ Passed | 8 s
p2p-mempool.py | ✓ Passed | 3 s
p2p-segwit.py | ✓ Passed | 62 s
p2p-versionbits-warning.py | ✓ Passed | 8 s
preciousblock.py | ✓ Passed | 8 s
prioritise_transaction.py | ✓ Passed | 7 s
proxy_test.py | ✓ Passed | 10 s
rawtransactions.py | ✓ Passed | 15 s
receivedby.py | ✓ Passed | 28 s
reindex.py | ✓ Passed | 12 s
rest.py | ✓ Passed | 12 s
rpcnamedargs.py | ✓ Passed | 3 s
segwit.py | ✓ Passed | 12 s
sendheaders.py | ✓ Passed | 26 s
signmessages.py | ✓ Passed | 3 s
signrawtransactions.py | ✓ Passed | 3 s
txn_clone.py | ✓ Passed | 10 s
txn_doublespend.py --mineblock | ✓ Passed | 10 s
uptime.py | ✓ Passed | 3 s
wallet-accounts.py | ✓ Passed | 3 s
wallet-dump.py | ✓ Passed | 6 s
wallet-encryption.py | ✓ Passed | 8 s
wallet-hd.py | ✓ Passed | 18 s
wallet.py | ✓ Passed | 69 s
walletbackup.py | ✓ Passed | 130 s
zapwallettxes.py | ✓ Passed | 15 s
zmq_test.py | ○ Skipped | 0 s
ALL | ✓ Passed | 936 s (accumulated)
Runtime: 242 s
12:44:36
```
Tree-SHA512: 6dfc4c11fd0caf7de6954c93679cf22c3df0acc6f432e616d1151062a61f456faa8ae2fe670b427868af55bb564802df84c8fd76e90b4b338750dbc23f46ad88
2019-09-24 16:58:03 +02:00
MarcoFalke
a82f22e528
Merge #10556 : Move stop/start functions from utils.py into BitcoinTestFramework
...
5ba83c1
[tests] fix nits. (John Newbery)
05b8c08
[tests] reorganize utils.py module (code move only) (John Newbery)
0d473c5
[tests] move mocktime property and functions to BitcoinTestFramework (John Newbery)
cad967a
[tests] Move stop_node and start_node methods to BitcoinTestFramework (John Newbery)
f1fe536
[tests] fix flake8 warnings in test_framework.py and util.py (John Newbery)
37065d2
[tests] remove unused imports from utils.py (John Newbery)
Tree-SHA512: 461db412c57c4d0030e27fe3f78f17bcaf00b966f319a9e613460cca897508ff70a29db7138133fe1be8d447dad6702ba2778f9eddfe929016e560d71c20b09f
2019-08-12 09:07:03 -05:00
Wladimir J. van der Laan
7802c82e31
Merge #10533 : [tests] Use cookie auth instead of rpcuser and rpcpassword
...
279fde5
Check for rpcuser/rpcpassword first then for cookie (Andrew Chow)
3ec5ad8
Add test for rpcuser/rpcpassword (Andrew Chow)
c53c983
Replace cookie auth in tests (Andrew Chow)
Tree-SHA512: 21efb84c87080a895cac8a7fe4766738c34eebe9686c7d10af1bf91ed4ae422e2d5dbbebffd00d34744eb6bb2d0195ea3aca86deebf085bbdeeb1d8b474241ed
2019-07-09 13:09:22 -05:00
MarcoFalke
e353d271f0
Merge #10359 : [tests] functional tests should call BitcoinTestFramework 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
2019-06-26 12:44:45 -05:00
MarcoFalke
70cd81cc8a
Merge #10423 : [tests] skipped tests should clean up after themselves
...
930deb9
[tests] skipped tests should clean up after themselves (John Newbery)
Tree-SHA512: ed486c1cf144c223efa738a66e8bb407089a23002871ef5b15c43d4c08641038a20253fc286853b457d66f37a52c81c16f7988aef90635ac262df6ce7bab9b18
2019-06-26 12:43:19 -05:00
MarcoFalke
ae05068c5d
Merge #10053 : [test] Allow functional test cases to be skipped
...
0c1ade6
Skip rpcbind_test if OS/network requirements are not met. (John Newbery)
232b666
Allow test cases to be skipped (John Newbery)
Tree-SHA512: d90c956ba6e27e53f422cba6267bdcc60faef9370a7e66b7f6480137f84d9a813442ac477b20fbbc540be2b4636928be910c46e221570ab3b9a5b9f0f11f7fc8
2019-05-21 08:52:44 -05:00
PastaPastaPasta
6edbc9cebd
Merge bitcoin#9956: Reorganise qa directory ( #2912 )
...
* Merge #9956 : Reorganise qa directory
63d66ba
Move src/test/bitcoin-util-test.py to test/util/bitcoin-util-test.py (John Newbery)
5b0bff4
Rename --enable-extended-rpc-tests to --enable-extended-functional-tests (John Newbery)
a9bd622
Rename test/pull-tester/rpc-tests.py to test/functional/test_runner.py (John Newbery)
c28ee91
Rename rpc-tests directory to functional (John Newbery)
00902c4
Rename qa directory to test (John Newbery)
Tree-SHA512: ee7125c0c647d81590177beef2c8852c4ef76fdcf888096d9d4d360562a01d8d3b453345c3040487b2a043935bd1e7e80018f34462d6e02262bedbe23edcc576
resolve build errors
Signed-off-by: Pasta <Pasta@dash.org>
update test_runner.py in testintegrations.sh
Signed-off-by: Pasta <Pasta@dash.org>
* moved dash specific tests
Signed-off-by: Pasta <Pasta@dash.org>
* dashify README.md
Signed-off-by: Pasta <Pasta@dash.org>
* removed autoix*.py
Signed-off-by: Pasta <Pasta@dash.org>
* change back file perms
* dedashify
Signed-off-by: Pasta <Pasta@dash.org>
2019-05-19 23:20:34 +03:00