Commit graph

15 commits

Author SHA1 Message Date
Dimitris Apostolou
4d9b4256d8 Fix typos 2018-03-21 08:34:44 +02:00
John Newbery
34e08b3510 [tests] Fix network threading in functional tests
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 09:17:21 -05:00
John Newbery
74e64f24b8 [tests] Use network_thread_start() in tests. 2017-12-11 09:17:21 -05:00
practicalswift
c7399e7082 Remove unused Python imports 2017-12-10 11:48:36 +01:00
John Newbery
873beca6de [tests] Rename NodeConn and NodeConnCB
NodeConn -> P2PConnection
NodeConnCB -> P2PInterface
2017-11-29 17:14:48 -05:00
John Newbery
dad596fc37 [tests] Make NodeConnCB a subclass of NodeConn
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-28 12:44:16 -05:00
John Newbery
5e5725cc2b [tests] Add p2p connection to TestNode
p2p connections can now be added to TestNode instances.

This commit also updates the example test to use the new
p2p interface in TestNode to demonstrate usage.

A future commit will update the existing tests to use p2p through the
TestNode.
2017-11-08 09:04:02 -05:00
John Newbery
3918d93f3c [tests] fixups from set_test_params() 2017-09-01 14:24:30 -04:00
John Newbery
7148b74dc3 [tests] Functional tests must explicitly set num_nodes 2017-09-01 12:25:55 -04:00
John Newbery
5448a1471d [tests] don't override __init__() in individual tests
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-09-01 12:25:55 -04:00
MarcoFalke
08ce33f8e9 qa: Move wait_until to util 2017-08-17 15:17:09 +02:00
MarcoFalke
d7be7b39fa
Merge #10705: Trivial: spelling fixes
f42fc1d50 doc: spelling fixes (klemens)

Pull request description:

  patch contains some spelling fixes ( just in comments ) as found by a bot ( http://www.misfix.org, https://github.com/ka7/misspell_fixer ).

Tree-SHA512: ba6046cfcd81b0783420daae7d776be92dd7b85a593e212f8f1b4403aca9b1b6af12cef7080d4ea5ed4a14952fd25e4300109a59c414e08f5395cdb9947bb750
2017-08-16 00:30:12 +02:00
klemens
f42fc1d508 doc: spelling fixes 2017-08-16 00:24:39 +02:00
MarcoFalke
faa76d1b79 qa: Fix inv race in example_test 2017-08-10 21:29:48 +02:00
John Newbery
e7ba6c16b3 [tests] add example test 2017-06-27 05:04:52 -04:00