aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p-leaktests.py
AgeCommit message (Collapse)Author
2018-01-25[tests] Rename p2p_* functional tests.Anthony Towns
2017-12-11[tests] Fix network threading in functional testsJohn Newbery
assumevalid.py, example_test.py and p2p-acceptblocks.py add p2p_connections after the NetworkThread has been started. This isn't permitted. Fix test to restart the network thread when adding new connections. p2p-leaktest.py had a potential race condition if the NetworkThread hadn't terminated by the time we tried to restart it.
2017-12-11[tests] Use network_thread_start() in tests.John Newbery
2017-11-29[tests] Rename NodeConn and NodeConnCBJohn Newbery
NodeConn -> P2PConnection NodeConnCB -> P2PInterface
2017-11-28[tests] Make NodeConnCB a subclass of NodeConnJohn Newbery
This makes NodeConnCB a subclass of NodeConn, and removes the need for the client code to know anything about the implementation details of NodeConnCB. NodeConn can now be swapped out for any other implementation of a low-level connection without changing client code.
2017-11-14Merge #11641: qa: Only allow disconnecting all NodeConnsWladimir J. van der Laan
faaa7db qa: Only allow disconnecting all NodeConns (MarcoFalke) Pull request description: Disconnecting the connection with `index=0` makes no sense when there are more than one connections, as the list "rotates around" and populates index 0 after `del`. Just disconnect all NodeConns in any case. Tree-SHA512: e5cf540823fccb31634b5a11501f54222be89862e80ccafc28bc06726480f8d2153b8c1b6f859fa6a6d087876251d48a6c6035bccdaaf16831e300bc17ff613d
2017-11-13qa: Only allow disconnecting all NodeConnsMarcoFalke
2017-11-08[tests] Remove support for p2p alert messagesJohn Newbery
Alert messages were removed in p2p version 70013 (Bitcoin Core V0.13.0)
2017-11-08[tests] use TestNode p2p connection in testsJohn Newbery
2017-09-13Merge #11078: [tests] Make p2p-leaktests.py more robustMarcoFalke
0063d2c3d [tests] Make p2p-leaktests.py more robust (John Newbery) Pull request description: There has been an example of p2p-leaktests.py failing on travis in the new service bits test (introduced in #11001 . It appeared to me that the previous p2p connections had not been fully disconnected before attempting to add new p2p connections. I've added a sleep and restarted the NetworkThread, but I don't know whether this will fix the problem, since I'm unable to reproduce the failure locally. @MarcoFalke - not sure what you want to do here? I don't think this change could make things any worse. Tree-SHA512: f5427c26267185a903c9b75bb3925bf153b8afce70c8e493bf8f585f57d809d20643b4ee69081300b211d22e960242aecc3d719f4ddd230aa08fdc5484b55055
2017-09-01[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.
2017-08-24[tests] Make p2p-leaktests.py more robustJohn Newbery
2017-08-17qa: Move wait_until to utilMarcoFalke
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-05-02[tests] Remove is_network_split from funtional test casesJohn Newbery
2017-04-18Remove duplicate method definitions in NodeConnCB subclassesJohn Newbery
All Node classes in individual test cases subclass from NodeConnCB. Many have duplicate definitions for methods that are defined in the base class. This commit removes those duplicate definitions. This commit removes ~290 lines of duplicate code.
2017-04-18Adds helper functions to NodeConnCBJohn Newbery
This commit adds some helper functions to NodeConnCB which are useful for many tests: - NodeConnCB now keeps track of the number of each message type that it's received and the most recent message of each type. Many tests assert on the most recent block, tx or reject message. - NodeConnCB now keeps track of its connection state by setting a connected boolean in on_open() and on_close() - NodeConnCB now has wait_for_block, wait_for_getdata, wait_for_getheaders, wait_for_inv and wait_for_verack methods I have updated the individual test cases to make sure that there are no namespace problems that cause them to fail with these new definitions. Future commits will remove the duplicate code.
2017-03-28Remove SingleNodeConnCBJohn Newbery
This commit merges the NodeConnCB and SingleNodeConnCB into a single class (called NodeConnCB). The original intent for the NodeConnCB was to be able to have a python 'mininode' connect to multiple running bitcoinds. This has never been used and can be achieved more easily by having multiple NodeConns backed by a common datastore if it is ever needed. The changes in mininode.py are just code moves (and merging the two classes into a single class). The code changes in the individual test cases are changing the subclasses to subclass from NodeConnCB instead of SingleNodeConnCB. There is a lot of duplicate code in the subclasses that can be removed in future commits.
2017-03-20Rename rpc-tests directory to functionalJohn Newbery