diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-03-10 12:45:30 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-03-10 12:45:38 -0400 |
commit | cf4cb28efcf80c018a7f070c671f43cd172dbd86 (patch) | |
tree | 12df378f1e03885de8f2a00e1a96477a586d7171 /test/functional | |
parent | 5d92ac26ed8984c29eabc4b78bcddd2423e68dac (diff) | |
parent | ffff9dcdc3cbe427739cc19cc7a53f032474fa2a (diff) | |
download | bitcoin-cf4cb28efcf80c018a7f070c671f43cd172dbd86.tar.xz |
Merge #18305: test: Explain why test logging should be used
ffff9dcdc3cbe427739cc19cc7a53f032474fa2a test: Explain why test logging should be used (MarcoFalke)
Pull request description:
Background is that some tests don't have any `self.log` call at all. Thus there are no "anchor points" and those tests are hard to debug because the logs can't easily be parsed by a human.
ACKs for top commit:
jonatack:
ACK ffff9dcdc3cbe427739cc19cc7a53f032474fa2a
instagibbs:
ACK https://github.com/bitcoin/bitcoin/pull/18305/commits/ffff9dcdc3cbe427739cc19cc7a53f032474fa2a
fanquake:
re-ACK ffff9dcdc3cbe427739cc19cc7a53f032474fa2a
Tree-SHA512: 08d962e85c4892c2a0c58feb5dc697c680a9d68e41a79417da6fcd415e0c5c735c4533a985cf225bb89deb5ca717d9bedf990657958079185804caa512b10f5a
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/README.md | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/functional/README.md b/test/functional/README.md index 77a9ce9acb..6582c1cbcd 100644 --- a/test/functional/README.md +++ b/test/functional/README.md @@ -51,10 +51,13 @@ don't have test cases for. #### General test-writing advice +- Instead of inline comments or no test documentation at all, log the comments to the test log, e.g. + `self.log.info('Create enough transactions to fill a block')`. Logs make the test code easier to read and the test + logic easier [to debug](/test/README.md#test-logging). - Set `self.num_nodes` to the minimum number of nodes necessary for the test. Having additional unrequired nodes adds to the execution time of the test as well as memory/CPU/disk requirements (which is important when running tests in - parallel or on Travis). + parallel). - Avoid stop-starting the nodes multiple times during the test if possible. A stop-start takes several seconds, so doing it several times blows up the runtime of the test. |