aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/test_framework/util.py
AgeCommit message (Collapse)Author
2016-11-19[qa] Increase wallet-dump RPC timeoutRussell Yanofsky
Increase wallet-dump RPC timeout from 30 seconds to 1 minute. This avoids a timeout error that seemed to happen regularly (around 50% of builds) on a particular jenkins server during the first getnewaddress RPC call made by the test. The failing stack trace looked like: Unexpected exception caught during testing: timeout('timed out',) File ".../bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 146, in main self.run_test() File ".../bitcoin/qa/rpc-tests/wallet-dump.py", line 73, in run_test addr = self.nodes[0].getnewaddress() File ".../bitcoin/qa/rpc-tests/test_framework/coverage.py", line 49, in __call__ return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs) File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 145, in __call__ response = self._request('POST', self.__url.path, postdata.encode('utf-8')) File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 121, in _request return self._get_response() File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 160, in _get_response http_response = self.__conn.getresponse() File "/usr/lib/python3.4/http/client.py", line 1171, in getresponse response.begin() File "/usr/lib/python3.4/http/client.py", line 351, in begin version, status, reason = self._read_status() File "/usr/lib/python3.4/http/client.py", line 313, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.4/socket.py", line 374, in readinto return self._sock.recv_into(b) Github-Pull: #9077 Rebased-From: 8463aaa63c5ac76421c4d2754ea9e17a31584c93
2016-11-19[qa] add assert_raises_message to check specific error messagemrbandrews
Github-Pull: #9168 Rebased-From: 307acdd3df03082295ac0f7fe9eba7dd35973bc4
2016-10-03test: Explicitly set encoding to utf8 when opening text filesWladimir J. van der Laan
These are text files but their encoding does not depend on the locale. Not all of them require utf8 but it is better to fix it at something to remove potential unpredictability. This is necessary on FreeBSD where no locale is set by default, and apparently Python defaults not only the terminal encoding to the locale but that of every text file. So without LOCALE environment it defaults text file encoding to ASCII. This causes problems with e.g. `bitcoin.conf`. Luckily the locale doesn't affect the default encoding for str.encode() and bytes.decode() on Python 3, so this is the only change necessary. Github-Pull: #8840 Rebased-From: 30930e847e2483c7c8163cc581b392bc288250e9
2016-10-03[qa] util: Move wait_bitcoinds() into stop_nodes()MarcoFalke
Github-Pull: #8860 Rebased-From: fa7c35c4ec630838178b4674288da33561a66f08
2016-09-21[qa]: add parsing for '<host>:<port>' argument form to rpc_url()whythat
Github-Pull: #8400 Rebased-From: 0ff4375c93bd159233282de5a33ad2e6c1e79841
2016-06-20Merge #8066: [qa] test_framework: Use different rpc_auth_pair for each nodeWladimir J. van der Laan
fad1845 [qa] test_framework: Use different rpc_auth_pair for each node (MarcoFalke)
2016-06-13[qa] util: Move check_fee_amount out of wallet.pyMarcoFalke
2016-05-26Tests: add timeout to sync_blocks() and sync_mempools()Suhas Daftuar
Previously these functions would infinitely loop if sync failed; now they have a default timeout of 60 seconds, after which an AssertionError is raised. sync_blocks() has also been improved and now compares the tip hash of each node, rather than just using block count.
2016-05-20Merge #8047: [qa] test_framework: Set wait-timeout for bitcoind procsMarcoFalke
fab5233 [qa] test_framework: Set wait-timeout for bitcoind procs (MarcoFalke)
2016-05-17[qa] test_framework: Use different rpc_auth_pair for each nodeMarcoFalke
2016-05-15[qa] Remove hardcoded "4 nodes" from test_frameworkMarcoFalke
2016-05-12[qa] test_framework: Set wait-timeout for bitcoind procsMarcoFalke
2016-05-09[qa] Add option --portseed to test_frameworkMarcoFalke
2016-05-06[qa] Stop other nodes, even when one fails to stopMarcoFalke
2016-05-06[qa] Refactor test_framework and pull testerMarcoFalke
* log to stdout * increase range for p2p and rpc ports * UPPERCASE_CONSTANTS * Stop nodes on CTRL+C
2016-05-05[qa] Switch to py3MarcoFalke
2016-04-26[qa] test_framework: Properly print exceptions and assert empty dictMarcoFalke
2016-04-19Move method to check matches within arrays on util.pyJoao Fonseca
2016-04-14Merge #7853: [qa] py2: Unfiddle strings into bytes explicitlyWladimir J. van der Laan
faa41ee [qa] py2: Unfiddle strings into bytes explicitly (MarcoFalke)
2016-04-13getblockchaininfo: make bip9_softforks an object, not an array.Rusty Russell
We can't change "softforks", but it seems far more logical to use tags in an object rather than using an "id" field in an array. For example, to get the csv status before, you need to iterate the array to find the entry with 'id' field equal to "csv": jq '.bip9_softforks | map(select(.id == "csv"))[] | .status' Now: jq '.bip9_softforks.csv.status' There is no issue with fork names being incompatible with JSON tags, since we're selecting them ourselves. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-04-10[qa] py2: Unfiddle strings into bytes explicitlyMarcoFalke
2016-04-07Tests: move get_bip9_status to util.pySuhas Daftuar
2016-03-26test_framework: detect failure of bitcoind startupWladimir J. van der Laan
Replace the `bitcoin-cli -rpcwait` after spawning bitcoind with our own loop that detects when bitcoind exits prematurely. And if one node fails to start, stop the others. This prevents a hang in such a case (see #7463).
2016-03-16Tests: make prioritise_transaction.py more robustSuhas Daftuar
2016-03-14[qa] Move create_tx() to util.pyMarcoFalke
2016-01-20[qa] Change default block priority size to 0MarcoFalke
2016-01-19Merge pull request #7164: Do not download transactions during initial ↵Wladimir J. van der Laan
blockchain sync 39a525c Do not download transactions during inital sync (ptschip)
2016-01-18Merge pull request #7194Wladimir J. van der Laan
135d6ec Add RPC tests for getblockheader. (James O'Beirne) 4745636 Add RPC documentation for getblockheader[chainwork]. (James O'Beirne) 16d4fce Add assert_is_hex_string and assert_is_hash_string to RPC test utils. (James O'Beirne)
2016-01-13[qa] Fix pyton syntax in rpc testsMarcoFalke
2016-01-05Merge pull request #7205Wladimir J. van der Laan
fa71669 [devtools] Use git pretty-format for year parsing (MarcoFalke) fa24439 Bump copyright headers to 2015 (MarcoFalke) fa6ad85 [devtools] Rewrite fix-copyright-headers.py (MarcoFalke)
2016-01-04Merge pull request #7250Wladimir J. van der Laan
fa0a974 [qa] Move gen_return_txouts() to util.py (MarcoFalke)
2015-12-24[qa] Move gen_return_txouts() to util.pyMarcoFalke
2015-12-22Merge pull request #7153Wladimir J. van der Laan
7632cf6 [Tests] Refactor some shared functions (Jonas Schnelli) 110ff11 [Tests] Add mempool_limit.py test (Jonas Schnelli)
2015-12-15Do not download transactions during inital syncptschip
2015-12-14Add assert_is_hex_string and assert_is_hash_string to RPC test utils.James O'Beirne
2015-12-14[RPC-Tests] add option to run rpc test over QT clientsJonas Schnelli
2015-12-13Bump copyright headers to 2015MarcoFalke
2015-12-04tests: Disable Tor interactionWladimir J. van der Laan
This is unnecessary during the current tests (any test for Tor interaction can explicitly enable it) and interferes with the proxy test.
2015-12-03[Tests] Refactor some shared functionsJonas Schnelli
2015-12-01Merge pull request #7022Wladimir J. van der Laan
50947ef Change default block priority size to 0 (Alex Morcos)
2015-12-01Add rounding helper function to util.pySuhas Daftuar
2015-11-30Change default block priority size to 0Alex Morcos
Make RPC tests have a default block priority size of 50000 (the old default) so we can still use free transactions in RPC tests. When priority is eliminated, we will have to make a different change if we want to continue allowing free txs.
2015-11-28[wallet] Add rpc tests to verify fee calculationsMarcoFalke
2015-11-11Add basic coverage reporting for RPC testsJames O'Beirne
Thanks to @MarcoFalke @dexX7 @laanwj for review.
2015-08-26Enable python tests for Native Windowsptschip
1) Multiplatorm support for devnull 2) Fixed a bug in the handling of cache files 3) Deleted run-bitcoin-cli as no longer needed
2015-05-21rpc-tests: remove python-bitcoinrpc directoryJonas Schnelli
place authproxy.py at same level as other utility classes
2015-05-18[QA] restructure rpc tests directoryJonas Schnelli
* move non-test classes to subdir `test-framework`