Age | Commit message (Collapse) | Author |
|
3f95a80 Fix docstrings in qa tests (John Newbery)
|
|
This commit fixes the module-level docstrings for the tests and helper
modules in qa. Many of these tests were uncommented previously - this
commit ensures that every test case has at least a minimum level of
commenting.
|
|
This includes work by jnewbery
|
|
66f861a Add a test for P2P inactivity timeouts (Matt Corallo)
b436f92 qa: Expose on-connection to mininode listeners (Matt Corallo)
8aaba7a qa: mininode learns when a socket connects, not its first action (Matt Corallo)
2cbd119 Disconnect peers which we do not receive VERACKs from within 60 sec (Matt Corallo)
|
|
|
|
|
|
Make sure that RPC tests are actually checking failures correctly by:
- Catching JSON RPC exceptions and verifying the error codes and messages.
- Failing the test case if the JSON RPC exception isn't raised.
|
|
453bda6 Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'. (Chris Moore)
|
|
Add RPC testcase for RPC named arguments.
|
|
|
|
|
|
|
|
facbfa5 [qa] Get rid of duplicate code (MarcoFalke)
|
|
|
|
|
|
|
|
1126c85 [qa] Change sync_blocks to pick smarter maxheight (Russell Yanofsky)
|
|
|
|
037159c Remove block-request logic from INV message processing (Matt Corallo)
3451203 [qa] Respond to getheaders and do not assume a getdata on inv (Matt Corallo)
d768f15 [qa] Make comptool push blocks instead of relying on inv-fetch (mrbandrews)
|
|
|
|
|
|
Motivation for this change is mainly to make sync_blocks behavior easier to
understand. Behavior is unchanged in the normal case when there are only 2
nodes in the rpc_connections set. When there are more than 2 nodes, the
previous "timeout -= wait" statement wouldn't take into account time spent
waiting for all nodes and as a result could lead to blocking for longer than
the requested timeout.
|
|
|
|
Instead of syncing to max height returned by the waitforblockheight RPC, sync
to the max height returned by the getblockcount RPC.
This change was suggested by Suhas Daftuar <sdaftuar@chaincode.com>.
|
|
fa97ccb [qa] util: Rework sync_*() (MarcoFalke)
fac1141 [qa] preciousblock: Use assert_equal and BitcoinTestFramework.__init__ (MarcoFalke)
|
|
e5d682f Fix mininode version message format (jnewbery)
|
|
|
|
|
|
|
|
* Only allow named args in sync_*()
* Make sync_* fails more verbose
* Add timeout to sync_chain()
|
|
e89614b [qa] Add more helpful RPC timeout message (Russell Yanofsky)
8463aaa [qa] Increase wallet-dump RPC timeout (Russell Yanofsky)
|
|
Replace previous timeout('timed out',) exception with more detailed error.
|
|
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)
|
|
Three categories of modifications:
1)
1 instance of 'The Bitcoin Core developers \n',
1 instance of 'the Bitcoin Core developers\n',
3 instances of 'Bitcoin Core Developers\n', and
12 instances of 'The Bitcoin developers\n'
are made uniform with the 443 instances of 'The Bitcoin Core developers\n'
2)
3 instances of 'BitPay, Inc\.\n' are made uniform with the other 6
instances of 'BitPay Inc\.\n'
3)
4 instances where there was no '(c)' between the 'Copyright' and the year
where it deviates from the style of the local directory.
|
|
5805ac8 Add preciousblock tests (Pieter Wuille)
5127c4f Add preciousblock RPC (Pieter Wuille)
|
|
|
|
|
|
|
|
Also improve tx printing
|
|
fa7c35c [qa] util: Move wait_bitcoinds() into stop_nodes() (MarcoFalke)
|
|
|
|
|
|
b5fd666 [qa] Fix race condition in p2p-compactblocks test (Suhas Daftuar)
|
|
Also fix a bug in the sync_with_ping() helper function
|
|
1d28faf test: Avoid ConnectionResetErrors during RPC tests (Wladimir 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.
|
|
This is necessary on FreeBSD and MacOSX, at least.
See https://github.com/bitcoin/bitcoin/pull/8834#issuecomment-250450213
|
|
|
|
This improves error reporting if `JSONRPCException` is not specifically caught
and ends up in Python's default backtrace handler.
Before:
```
Traceback (most recent call last):
File "/.../projects/bitcoin/bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 153, in __call__
raise JSONRPCException(response['error'])
test_framework.authproxy.JSONRPCException
```
After:
```
Traceback (most recent call last):
File "/.../projects/bitcoin/bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 152, in __call__
raise JSONRPCException(response['error'])
test_framework.authproxy.JSONRPCException: Unknown named parameter random (-8)
```
|
|
783e930 [copyright] Add missing copyright headers (isle2983)
|